Skip to content

Commit

Permalink
[Tests] increase coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Mar 11, 2024
1 parent 77952d0 commit aa7de58
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/exposed-harness.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ var tap = require('tap');
tap.test('main harness object is exposed', function (tt) {
tt.equal(typeof tape.getHarness, 'function', 'tape.getHarness is a function');

tt.equal(typeof tape.run, 'function', 'tape.run is a function');

tt.equal(tape.getHarness()._results.pass, 0);

tt.equal(tape.getHarness().run, undefined, 'tape.getHarness().run is undefined (wait not called)');

tt.end();
});
16 changes: 16 additions & 0 deletions test/wait.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
'use strict';

var tape = require('../');
var tap = require('tap');

tap.test('tape.wait()', function (tt) {
tt.equal(typeof tape.getHarness, 'function', 'tape.getHarness is a function');

tt.equal(typeof tape.run, 'function', 'tape.run is a function');

tape.wait();

tt.equal(typeof tape.getHarness().run, 'function', 'tape.getHarness().run is a function (wait called)');

tt.end();
});

0 comments on commit aa7de58

Please sign in to comment.