f7318c7d6f183d74830f3231eff4529318ada557
[platform/upstream/nodejs.git] / deps / npm / test / tap / lifecycle-signal.js
1 var test = require("tap").test
2 var npm = require.resolve("../../bin/npm-cli.js")
3 var node = process.execPath
4 var spawn = require("child_process").spawn
5 var path = require("path")
6 var pkg = path.resolve(__dirname, "lifecycle-signal")
7
8 test("lifecycle signal abort", function (t) {
9   var child = spawn(node, [npm, "install"], {
10     cwd: pkg
11   })
12   child.on("close", function (code, signal) {
13     t.equal(code, null)
14     t.equal(signal, "SIGSEGV")
15     t.end()
16   })
17 })