From c6906deef20ca3631862b84d1556cfcf8e4479de Mon Sep 17 00:00:00 2001 From: Kevin Sawicki Date: Thu, 23 Jun 2016 15:39:21 -0700 Subject: [PATCH] Add failing spec for trailing separator bug --- spec/modules-spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spec/modules-spec.js b/spec/modules-spec.js index 87396ac764f8..f2c45b0a71b4 100644 --- a/spec/modules-spec.js +++ b/spec/modules-spec.js @@ -57,6 +57,11 @@ describe('Module._nodeModulePaths', function () { path.join(process.resourcesPath, 'node_modules') ]) + modulePath = process.resourcesPath + '-foo' + let nodeModulePaths = Module._nodeModulePaths(modulePath) + assert(nodeModulePaths.includes(path.join(modulePath, 'node_modules'))) + assert(nodeModulePaths.includes(path.join(modulePath, '..', 'node_modules'))) + modulePath = path.join(process.resourcesPath, 'foo') assert.deepEqual(Module._nodeModulePaths(modulePath), [ path.join(process.resourcesPath, 'foo', 'node_modules'),