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 <rtrott@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
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)