Skip to content

Commit

Permalink
Fixed indentation and some missing semicolons requested in vowsjs#82
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanrolds authored and indexzero committed Nov 25, 2011
1 parent f39a4e2 commit 81482b1
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions lib/vows/suite.js
Expand Up @@ -338,25 +338,25 @@ this.tryEnd = function (batch) {
Object.defineProperty(env, "callback", {
get: function () {
teardown.awaitingCallback = true;

return function () {
teardown.awaitingCallback = false;
maybeFinish();
};
}
})
});

teardown.tests.teardown.apply(env, teardown.topics);
}

function maybeFinish() {
var pending = batch.teardowns.filter(function (teardown) {
return teardown.awaitingCallback;
});
var pending = batch.teardowns.filter(function (teardown) {
return teardown.awaitingCallback;
});

if (pending.length === 0) {
finish();
}
if (pending.length === 0) {
finish();
}
}

function finish() {
Expand Down
2 changes: 1 addition & 1 deletion test/vows-test.js
Expand Up @@ -477,7 +477,7 @@ vows.describe("Vows with asynchonous teardowns").addBatch({
}).addBatch({
"The next batch": {
"is not run until the teardown is complete": function () {
assert.ok(tornDown)
assert.ok(tornDown);
}
}
}).export(module);

0 comments on commit 81482b1

Please sign in to comment.