@godaddy/terminus
Advanced tools
Comparing version 1.0.1 to 2.0.0
@@ -54,3 +54,4 @@ const stoppable = require('stoppable'); | ||
.then(() => { | ||
process.exit(); | ||
process.removeListener('SIGTERM', cleanup); | ||
process.kill(process.pid, 'SIGTERM'); | ||
}) | ||
@@ -57,0 +58,0 @@ .catch((error) => { |
@@ -85,10 +85,22 @@ const http = require('http'); | ||
it('runs onSigterm when getting the SIGTERM signal', () => { | ||
const res = execFileSync('node', ['lib/standalone-tests/terminus.onsigterm.js']); | ||
expect(res.toString().trim()).to.eql('on-sigterm-runs'); | ||
try { | ||
execFileSync('node', ['lib/standalone-tests/terminus.onsigterm.js']); | ||
} catch (ex) { | ||
expect(ex.stdout.toString().trim()).to.eql('on-sigterm-runs'); | ||
return; | ||
} | ||
throw new Error('running the test should throw, as the exitcode is not 0'); | ||
}); | ||
it('runs onShutdown after onSigterm', () => { | ||
const res = execFileSync('node', ['lib/standalone-tests/terminus.onshutdown.js']); | ||
expect(res.toString().trim()).to.eql('on-sigterm-runs\non-shutdown-runs'); | ||
try { | ||
execFileSync('node', ['lib/standalone-tests/terminus.onshutdown.js']); | ||
} catch (ex) { | ||
expect(ex.stdout.toString().trim()).to.eql('on-sigterm-runs\non-shutdown-runs'); | ||
return; | ||
} | ||
throw new Error('running the test should throw, as the exitcode is not 0'); | ||
}); | ||
}); |
@@ -1,1 +0,1 @@ | ||
{"name":"@godaddy/terminus","version":"1.0.1","description":"","main":"index.js","scripts":{"test":"mocha lib/**/*.spec.js","eslint":"eslint-godaddy -c .eslintrc lib example index.js","coverage":"nyc mocha lib/**/*.spec.js","publish":"npm run eslint && npm test","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"https://github.com/godaddy/terminus.git"},"keywords":[],"author":"","license":"ISC","dependencies":{"es6-promisify":"^5.0.0","stoppable":"^1.0.4"},"devDependencies":{"chai":"^4.1.2","eslint":"^4.4.1","eslint-config-godaddy":"^2.0.0","eslint-plugin-json":"^1.2.0","eslint-plugin-mocha":"^4.11.0","express":"^4.16.2","mocha":"^4.0.1","node-fetch":"^1.7.3","nyc":"^11.3.0","supertest":"^3.0.0","semantic-release":"^8.2.0"}} | ||
{"name":"@godaddy/terminus","version":"2.0.0","description":"","main":"index.js","scripts":{"test":"mocha lib/**/*.spec.js","eslint":"eslint-godaddy -c .eslintrc lib example index.js","coverage":"nyc mocha lib/**/*.spec.js","publish":"npm run eslint && npm test","semantic-release":"semantic-release pre && npm publish && semantic-release post"},"repository":{"type":"git","url":"https://github.com/godaddy/terminus.git"},"keywords":[],"author":"","license":"ISC","dependencies":{"es6-promisify":"^5.0.0","stoppable":"^1.0.4"},"devDependencies":{"chai":"^4.1.2","eslint":"^4.4.1","eslint-config-godaddy":"^2.0.0","eslint-plugin-json":"^1.2.0","eslint-plugin-mocha":"^4.11.0","express":"^4.16.2","mocha":"^4.0.1","node-fetch":"^1.7.3","nyc":"^11.3.0","supertest":"^3.0.0","semantic-release":"^8.2.0"}} |
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
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
8710
204