Skip to content

Commit bbd1c79

Browse files
jankjnMylesBorins
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 977fdce commit bbd1c79

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
'use strict';
22
const common = require('../common');
33
const assert = require('assert');
4+
const path = require('path');
45

5-
const content = require(common.fixturesDir +
6-
'/json-with-directory-name-module/module-stub/one/two/three.js');
6+
const filePath = path.join(
7+
common.fixturesDir,
8+
'json-with-directory-name-module',
9+
'module-stub',
10+
'one',
11+
'two',
12+
'three.js'
13+
);
14+
const content = require(filePath);
715

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

0 commit comments

Comments
 (0)