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 MylesBorins committed Aug 16, 2017
1 parent 02a4377 commit c1dee46
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 c1dee46

Please sign in to comment.