Skip to content

Commit c56c0be

Browse files
aichbauerJPeer264
authored andcommitted
🔨 Refactor: changed path.join
1 parent 564f4f4 commit c56c0be

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

test/getConfig.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ test('read config from package.json', (t) => {
2020
const packageJson = json.readToObjSync(path.join(cwd, 'package.json'));
2121
packageJson.sgc = sgcrc;
2222

23-
fs.copySync(`${cwd}/package.json`, `${cwd}/package.json.back`);
24-
fs.unlinkSync(`${cwd}/package.json`);
25-
fs.writeFileSync(`${cwd}/package.json`, JSON.stringify(packageJson));
23+
fs.copySync(path.join(cwd, 'package.json'), path.join(cwd, 'package.json.back'));
24+
fs.unlinkSync(path.join(cwd, 'package.json'));
25+
fs.writeFileSync(path.join(cwd, 'package.json'), JSON.stringify(packageJson));
2626
t.deepEqual(getConfig(), sgcrc);
27-
fs.unlinkSync(`${cwd}/package.json`);
28-
fs.renameSync(`${cwd}/package.json.back`, `${cwd}/package.json`);
27+
fs.unlinkSync(path.join(cwd, 'package.json'));
28+
fs.renameSync(path.join(cwd, 'package.json.back'), path.join(cwd, 'package.json'));
2929
});

0 commit comments

Comments
 (0)