Skip to content

Commit

Permalink
fix merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jan 19, 2013
2 parents 128509c + 2666849 commit 5e53c14
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ function createHarness (conf_) {

var began = false;
var only = false;
var closed = false;
var out = new Render();

var test = function (name, conf, cb) {
Expand All @@ -37,7 +38,10 @@ function createHarness (conf_) {
if (conf.exit !== false) {
onexit(function (code) {
t._exit();
out.close();
if (!closed) {
closed = true
out.close();
}
if (!code && !t._ok && (!only || name === only)) {
process.exit(1);
}
Expand Down Expand Up @@ -92,7 +96,8 @@ function createHarness (conf_) {
process.nextTick(function () {
running = false;
if (pending.length) return pending.shift()();
if (count === 0) {
if (count === 0 && !closed) {
closed = true
out.close();
}
if (conf.exit !== false && canExit && !t._ok) {
Expand Down

0 comments on commit 5e53c14

Please sign in to comment.