Skip to content

Commit c866c90

Browse files
jankjnFishrock123
authored andcommitted
test: use path.join for long path concatenation
PR-URL: #14280 Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 94c7331 commit c866c90

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

+10-2
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)