Skip to content

Commit 31d5504

Browse files
committed
Use path.join in place of string templates.
1 parent a7b9e2a commit 31d5504

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/specs/utils.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
const assert = require('assert');
2+
const path = require('path');
23

34
const utils = require('../../lib/utils');
45

@@ -8,25 +9,25 @@ describe('doxdox utils', () => {
89

910
it('find package without input', () => {
1011

11-
assert.equal(utils.findPackageFileInPath(), `${process.cwd()}/package.json`);
12+
assert.equal(utils.findPackageFileInPath(), path.join(process.cwd(), 'package.json'));
1213

1314
});
1415

1516
it('find package with input directory', () => {
1617

17-
assert.equal(utils.findPackageFileInPath('./'), `${process.cwd()}/package.json`);
18+
assert.equal(utils.findPackageFileInPath('./'), path.join(process.cwd(), 'package.json'));
1819

1920
});
2021

2122
it('find package with input file', () => {
2223

23-
assert.equal(utils.findPackageFileInPath('./package.json'), `${process.cwd()}/package.json`);
24+
assert.equal(utils.findPackageFileInPath('./package.json'), path.join(process.cwd(), 'package.json'));
2425

2526
});
2627

2728
it('find package with input non package.json file', () => {
2829

29-
assert.equal(utils.findPackageFileInPath('./index.js'), `${process.cwd()}/package.json`);
30+
assert.equal(utils.findPackageFileInPath('./index.js'), path.join(process.cwd(), 'package.json'));
3031

3132
});
3233

0 commit comments

Comments
 (0)