View gist:a3172e1c90dbf0090dcb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(Process) { | |
describe('Process', function() { | |
it('intercepts sig int', function(done) { | |
Process.on('exit', function(exitPromises) { | |
var exitProcess = new RSVP.Promise(function(resolve, reject) { | |
setTimeout(function() { | |
resolve(true); | |
}, 100); | |
}); |
View gist:8da4636aeac4fbc4e30f
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(COMPOSITE) { | |
//Load our dependencies | |
var util = require('util'); | |
var events = require('events'); | |
var RSVP = require('rsvp'); | |
COMPOSITE.Process = new events.EventEmitter; | |
//Before we get interrupted, close resources |