Skip to content

Commit

Permalink
Use exit module instead of process.exit for Windows workaround
Browse files Browse the repository at this point in the history
- process.exit isn't properly waiting for buffers to finish writing in Windows
- issue in node fixed in v0.11.12: nodejs/node-v0.x-archive#3584

Fixes #20
  • Loading branch information
Christopher Amavisca committed Feb 4, 2015
1 parent 5e0a2dd commit 92f47d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
7 changes: 4 additions & 3 deletions lib/jasmine.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
var path = require('path'),
util = require('util'),
glob = require('glob');
glob = require('glob'),
exit = require('exit');

module.exports = Jasmine;
module.exports.ConsoleReporter = require('./console_reporter');
Expand Down Expand Up @@ -28,10 +29,10 @@ Jasmine.prototype.addReporter = function(reporter) {
Jasmine.prototype.configureDefaultReporter = function(options) {
var defaultOnComplete = function(passed) {
if(passed) {
process.exit(0);
exit(0);
}
else {
process.exit(1);
exit(1);
}
};

Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
"test": "./node_modules/.bin/grunt && ./bin/jasmine.js"
},
"dependencies": {
"jasmine-core": "~2.2.0",
"glob": "^3.2.11"
"exit": "^0.1.2",
"glob": "^3.2.11",
"jasmine-core": "~2.2.0"
},
"bin": "./bin/jasmine.js",
"main": "./lib/jasmine.js",
Expand Down

0 comments on commit 92f47d3

Please sign in to comment.