Add failing spec for trailing separator bug

This commit is contained in:
Kevin Sawicki 2016-06-23 15:39:21 -07:00
parent b273b70eee
commit c6906deef2

View file

@ -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'),