diff options
author | Rebecca Turner <me@re-becca.org> | 2017-05-26 00:08:03 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-05-26 04:55:33 +0300 |
commit | 1ea953a983665c2a3684be120ec407e529d11c4a (patch) | |
tree | 0b1c6af474d720c68dac95a4291010ec6bdd6287 /test | |
parent | 4c99147ab46edd7c6a4f5b06e000f2a5e4c366a7 (diff) |
test: gently-rm-linked-module: Cleanup output
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/gently-rm-linked-module.js | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/tap/gently-rm-linked-module.js b/test/tap/gently-rm-linked-module.js index 7d5c4905e..a9804cd79 100644 --- a/test/tap/gently-rm-linked-module.js +++ b/test/tap/gently-rm-linked-module.js @@ -47,7 +47,7 @@ env.npm_config_prefix = linkedGlobal var EXEC_OPTS = { cwd: workingDir, env: env, - stdio: [0, 1, 2] + stdio: [0, 'pipe', 2] } test('setup', function (t) { @@ -58,11 +58,12 @@ test('setup', function (t) { }) test('install and link', function (t) { + var globalBin = resolve(linkedGlobal, isWindows ? '.' : 'bin', 'linked') + var globalModule = resolve(linkedGlobal, isWindows ? '.' : 'lib', 'node_modules', '@test', 'linked') // link our test module into the global folder - return common.npm(['--loglevel', 'error', 'link', toInstall], EXEC_OPTS).spread((code) => { + return common.npm(['--loglevel', 'error', 'link', toInstall], EXEC_OPTS).spread((code, out) => { + t.comment(out) t.is(code, 0, 'link succeeded') - var globalBin = resolve(linkedGlobal, isWindows ? '.' : 'bin', 'linked') - var globalModule = resolve(linkedGlobal, isWindows ? '.' : 'lib', 'node_modules', '@test', 'linked') var localBin = resolve(workingDir, 'node_modules', '.bin', 'linked') var localModule = resolve(workingDir, 'node_modules', '@test', 'linked') try { @@ -76,8 +77,9 @@ test('install and link', function (t) { if (code !== 0) throw new Error('aborting') // and try removing it and make sure that succeeds - return common.npm(['--global', '--loglevel', 'error', 'rm', '@test/linked' ], EXEC_OPTS) - }).spread((code) => { + return common.npm(['--global', '--loglevel', 'error', 'rm', '@test/linked'], EXEC_OPTS) + }).spread((code, out) => { + t.comment(out) t.is(code, 0, 'rm succeeded') t.throws(function () { fs.statSync(globalBin) }, 'global bin removed') t.throws(function () { fs.statSync(globalModule) }, 'global module removed') |