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 MylesBorins committed Sep 3, 2017
1 parent df76b15 commit 4d5a21c
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
@@ -1,9 +1,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 4d5a21c

Please sign in to comment.