summaryrefslogtreecommitdiff
path: root/deps/npm/test/tap/lifecycle-signal.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/test/tap/lifecycle-signal.js')
-rw-r--r--deps/npm/test/tap/lifecycle-signal.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/deps/npm/test/tap/lifecycle-signal.js b/deps/npm/test/tap/lifecycle-signal.js
new file mode 100644
index 000000000..f7318c7d6
--- /dev/null
+++ b/deps/npm/test/tap/lifecycle-signal.js
@@ -0,0 +1,17 @@
+var test = require("tap").test
+var npm = require.resolve("../../bin/npm-cli.js")
+var node = process.execPath
+var spawn = require("child_process").spawn
+var path = require("path")
+var pkg = path.resolve(__dirname, "lifecycle-signal")
+
+test("lifecycle signal abort", function (t) {
+ var child = spawn(node, [npm, "install"], {
+ cwd: pkg
+ })
+ child.on("close", function (code, signal) {
+ t.equal(code, null)
+ t.equal(signal, "SIGSEGV")
+ t.end()
+ })
+})