test: improve error messages in test-npm-install

PR-URL: https://github.com/nodejs/node/pull/11027
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit is contained in:
Gonen Dukas authored and James M Snell committed 2017-02-01 11:17:53 -08:00
1 parent e5bd880a20
commit 6ca1bdfeb1
1 file changed
+2 -2
+2 -2
View File
@@ -53,8 +53,8 @@ const proc = spawn(process.execPath, args, {
});
function handleExit(code, signalCode) {
assert.strictEqual(code, 0, 'npm install should run without an error');
assert.ok(signalCode === null, 'signalCode should be null');
assert.strictEqual(code, 0, `npm install got error code ${code}`);
assert.strictEqual(signalCode, null, `unexpected signal: ${signalCode}`);
assert.doesNotThrow(function() {
fs.accessSync(installDir + '/node_modules/package-name');
});