Skip to content

Commit

Permalink
rename tearDown to onFinish
Browse files Browse the repository at this point in the history
Fixes #175
  • Loading branch information
Roald de Vries committed Nov 13, 2015
1 parent b09c92e commit b01c08b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ exports = module.exports = (function () {
return harness.createStream(opts);
};

lazyLoad.tearDown = function () {
return getHarness().tearDown.apply(this, arguments);
lazyLoad.onFinish = function () {
return getHarness().onFinish.apply(this, arguments);
};

lazyLoad.getHarness = getHarness
Expand Down Expand Up @@ -131,7 +131,7 @@ function createHarness (conf_) {
return results.createStream(opts);
};

test.tearDown = function (cb) {
test.onFinish = function (cb) {
results.on('done', cb);
};

Expand Down
4 changes: 2 additions & 2 deletions test/tearDown.js → test/onFinish.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
var tap = require("tap");
var tape = require("../");

tap.test("tear down", {timeout: 1000}, function (tt) {
tap.test("on finish", {timeout: 1000}, function (tt) {
tt.plan(1);
tape.tearDown(function() {
tape.onFinish(function() {
tt.pass('tape ended');
});
tape('dummy test', function(t) {
Expand Down

0 comments on commit b01c08b

Please sign in to comment.