Skip to content

Commit

Permalink
Merge pull request #170 from TehShrike/master
Browse files Browse the repository at this point in the history
Expose the main test harness
  • Loading branch information
Raynos committed Aug 11, 2015
2 parents 38a8a9d + fc889f5 commit d26e522
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ exports = module.exports = (function () {
}
return harness.createStream(opts);
};


lazyLoad.getHarness = getHarness

return lazyLoad

function getHarness (opts) {
if (!opts) opts = {};
opts.autoclose = !canEmitExit;
Expand Down
13 changes: 13 additions & 0 deletions test/exposed-harness.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
var tape = require('../');
var tap = require('tap');

tap.test('main harness object is exposed', function (assert) {

assert.equal(typeof tape.getHarness, 'function', 'tape.getHarness is a function')

assert.equal(tape.getHarness()._results.pass, 0)

assert.end()

})

0 comments on commit d26e522

Please sign in to comment.