Skip to content

Commit

Permalink
update tests to thread through exit: false
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Dec 4, 2012
1 parent 329f784 commit c8e11e1
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var canExit = typeof process !== 'undefined' && process
&& typeof process.exit === 'function'
;

function createHarness () {
function createHarness (conf_) {
var pending = [];
var running = false;

Expand All @@ -22,7 +22,7 @@ function createHarness () {

var test = function (name, conf, cb) {
var t = new Test(name, conf, cb);
if (!conf || typeof conf !== 'object') conf = {};
if (!conf || typeof conf !== 'object') conf = conf_ || {};

if (conf.exit !== false && canEmitExit) {
process.on('exit', function (code) {
Expand Down
2 changes: 1 addition & 1 deletion test/fail.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var tap = require('tap');
tap.test('array test', function (tt) {
tt.plan(1);

var test = tape.createHarness();
var test = tape.createHarness({ exit : false });
var tc = tap.createConsumer();

var rows = [];
Expand Down
2 changes: 1 addition & 1 deletion test/harness.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
var test = require('../');
var harness = test.createHarness();
var harness = test.createHarness({ exit : false });

// minimal write stream mockery
var collector = {
Expand Down
2 changes: 1 addition & 1 deletion test/too_many.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ var tap = require('tap');
tap.test('array test', function (tt) {
tt.plan(1);

var test = tape.createHarness();
var test = tape.createHarness({ exit : false });
var tc = tap.createConsumer();

var rows = [];
Expand Down

0 comments on commit c8e11e1

Please sign in to comment.