Skip to content

Commit

Permalink
test: use path.join for long path concatenation
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
jankjn authored and addaleax committed Jul 21, 2017
1 parent 8d28d08 commit 66406ce
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions test/parallel/test-require-extensions-same-filename-as-dir.js
Original file line number Diff line number Diff line change
Expand Up @@ -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!');

0 comments on commit 66406ce

Please sign in to comment.