Skip to content

Commit

Permalink
[Tests] add failing test for #425
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Jul 26, 2021
1 parent 6a5df50 commit 034ce6a
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion test/onFinish.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,26 @@
var tap = require('tap');
var tape = require('../');

tap.test('on finish', { timeout: 1000 }, function (tt) {
tap.test('on finish', { timeout: 1e3 }, function (tt) {
tt.plan(1);
tape.onFinish(function () {
tt.pass('tape ended');
});
tape('dummy test', function (t) {
t.comment('default harness comment');
t.end();
});
});

var tapeHarness = tape.createHarness();

tap.test('on finish (createHarness)', { timeout: 1e3 }, function (tt) {
tt.plan(1);
tapeHarness.onFinish(function () {
tt.pass('tape ended');
});
tapeHarness('dummy test', function (t) {
t.comment('createHarness comment');
t.end();
});
});

0 comments on commit 034ce6a

Please sign in to comment.