diff --git a/test/parallel/test-require-extensions-same-filename-as-dir.js b/test/parallel/test-require-extensions-same-filename-as-dir.js index ff95a47b9a83bf..6b42670a87c0a4 100644 --- a/test/parallel/test-require-extensions-same-filename-as-dir.js +++ b/test/parallel/test-require-extensions-same-filename-as-dir.js @@ -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!');