Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRobert Kowalski <rok@kowalski.gd>2014-02-12 23:27:15 +0400
committerisaacs <i@izs.me>2014-04-16 02:11:19 +0400
commitc9d6f1356a7ba9e5b6f16cac25bd527ac55d6b7c (patch)
tree3f1e18663b2efc90b136e789621a480c3c74d3ce /test
parent6be6b4b74e5fd256a1bdfa098ea6541c62b30928 (diff)
fix failing test on linux
The GNU shell returns a code and no signal if it gets a SIGSEGV signal, so we have to skip this. Hat tip to @tjfontaine
Diffstat (limited to 'test')
-rw-r--r--test/tap/lifecycle-signal.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/tap/lifecycle-signal.js b/test/tap/lifecycle-signal.js
index d3f94e6eb..9d88fbd79 100644
--- a/test/tap/lifecycle-signal.js
+++ b/test/tap/lifecycle-signal.js
@@ -8,10 +8,18 @@ var pkg = path.resolve(__dirname, "lifecycle-signal")
test("lifecycle signal abort", function (t) {
// windows does not use lifecycle signals, abort
if (process.platform === "win32" || process.env.TRAVIS) return t.end()
+
var child = spawn(node, [npm, "install"], {
cwd: pkg
})
child.on("close", function (code, signal) {
+ // GNU shell returns a code, no signal
+ if (process.platform === "linux") {
+ t.equal(code, 1)
+ t.equal(signal, null)
+ return t.end()
+ }
+
t.equal(code, null)
t.equal(signal, "SIGSEGV")
t.end()