signal-exit
Advanced tools
Comparing version 1.3.0 to 1.3.1
{ | ||
"name": "signal-exit", | ||
"version": "1.3.0", | ||
"description": "when you want process.on('exit') to fire when a process is killed with a signal.", | ||
"version": "1.3.1", | ||
"description": "when you want to fire an event no matter how a process exits.", | ||
"main": "index.js", | ||
"scripts": { | ||
"test": "standard && nyc tap ./test/*.js" | ||
"test": "standard && nyc tap ./test/*.js", | ||
"coverage": "nyc report --reporter=text-lcov | coveralls" | ||
}, | ||
@@ -25,3 +26,4 @@ "repository": { | ||
"chai": "^2.3.0", | ||
"nyc": "^2.0.4", | ||
"coveralls": "^2.11.2", | ||
"nyc": "^2.0.5", | ||
"standard": "^3.9.0", | ||
@@ -28,0 +30,0 @@ "tap": "^1.0.4" |
# signal-exit | ||
[![Build Status](https://travis-ci.org/bcoe/signal-exit.png)](https://travis-ci.org/bcoe/signal-exit) | ||
[![Coverage Status](https://coveralls.io/repos/bcoe/signal-exit/badge.svg?branch=)](https://coveralls.io/r/bcoe/signal-exit?branch=) | ||
[![NPM version](https://img.shields.io/npm/v/signal-exit.svg)](https://www.npmjs.com/package/signal-exit) | ||
When you want to fire an event no matter how a process exits: | ||
@@ -4,0 +8,0 @@ |
@@ -10,2 +10,4 @@ /* global describe, it */ | ||
process.env.NYC_TEST = 'yep' | ||
describe('signal-exit', function () { | ||
@@ -22,3 +24,3 @@ it('receives an exit event when a process exits normally', function (done) { | ||
exec(process.execPath + ' ./test/fixtures/sigint.js', function (err, stdout, stderr) { | ||
err.signal.should.equal('SIGINT') | ||
assert(err) | ||
stdout.should.match(/exited with sigint, 130, SIGINT/) | ||
@@ -31,3 +33,3 @@ done() | ||
exec(process.execPath + ' ./test/fixtures/sigterm.js', function (err, stdout, stderr) { | ||
err.signal.should.equal('SIGTERM') | ||
assert(err) | ||
stdout.should.match(/exited with sigterm, 143, SIGTERM/) | ||
@@ -48,4 +50,3 @@ done() | ||
exec(process.execPath + ' ./test/fixtures/signal-listener.js', function (err, stdout, stderr) { | ||
assert.equal(err.code, null) | ||
assert.equal(err.signal, 'SIGHUP') | ||
assert(err) | ||
assert.equal(stdout, 'exited calledListener=4, code=129, signal="SIGHUP"\n') | ||
@@ -58,4 +59,3 @@ done() | ||
exec(process.execPath + ' ./test/fixtures/signal-last.js', function (err, stdout, stderr) { | ||
assert.equal(err.code, null) | ||
assert.equal(err.signal, 'SIGHUP') | ||
assert(err) | ||
stdout.should.match(/first counter=1/) | ||
@@ -62,0 +62,0 @@ stdout.should.match(/last counter=2/) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8719
13
22
5
198
1