From c866c9078b9cbacce7ec06b34460a97ffc7ae017 Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 16 Jul 2017 14:41:47 +0800 Subject: [PATCH] test: use path.join for long path concatenation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/14280 Reviewed-By: Rich Trott Reviewed-By: Michaël Zasso Reviewed-By: Gibson Fahnestock Reviewed-By: Colin Ihrig Reviewed-By: Tobias Nießen Reviewed-By: Gireesh Punathil Reviewed-By: James M Snell Reviewed-By: Refael Ackermann --- .../test-require-extensions-same-filename-as-dir.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) 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 610b8d1ce26584..546a2cb381d508 100644 --- a/test/parallel/test-require-extensions-same-filename-as-dir.js +++ b/test/parallel/test-require-extensions-same-filename-as-dir.js @@ -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!');