test: use path.join for long path concatenation
PR-URL: https://github.com/nodejs/node/pull/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>
This commit is contained in:
parent
97008a7b0d
commit
8ddb725f4f
@ -22,9 +22,17 @@
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
const assert = require('assert');
|
||||
const path = require('path');
|
||||
|
||||
const content = require(common.fixturesDir +
|
||||
'/json-with-directory-name-module/module-stub/one/two/three.js');
|
||||
const filePath = path.join(
|
||||
common.fixturesDir,
|
||||
'json-with-directory-name-module',
|
||||
'module-stub',
|
||||
'one',
|
||||
'two',
|
||||
'three.js'
|
||||
);
|
||||
const content = require(filePath);
|
||||
|
||||
assert.notStrictEqual(content.rocko, 'artischocko');
|
||||
assert.strictEqual(content, 'hello from module-stub!');
|
||||
|
Loading…
x
Reference in New Issue
Block a user