Skip to content

Commit 2d764b0

Browse files
committed
test: use path.join for long path concatenation
1 parent 9cbfd5b commit 2d764b0

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

test/parallel/test-require-extensions-same-filename-as-dir.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,17 @@
2222
'use strict';
2323
const common = require('../common');
2424
const assert = require('assert');
25+
const path = require('path');
2526

26-
const content = require(common.fixturesDir +
27-
'/json-with-directory-name-module/module-stub/one/two/three.js');
27+
const filePath = path.join(
28+
common.fixturesDir,
29+
'json-with-directory-name-module',
30+
'module-stub',
31+
'one',
32+
'two',
33+
'three.js'
34+
);
35+
const content = require(filePath);
2836

2937
assert.notStrictEqual(content.rocko, 'artischocko');
3038
assert.strictEqual(content, 'hello from module-stub!');

0 commit comments

Comments
 (0)