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 <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>
  • Loading branch information
jankjn authored and Fishrock123 committed Jul 24, 2017
1 parent 94c7331 commit c866c90
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 c866c90

Please sign in to comment.