tap-browser-el
A tap/tape reporter which adds a dom element to the dom
Usage
tap-browser-el
will override console.log
and watch what's being pushed to it and parse any tap/tape content.
Example:
// you can optionally pass in el // by default a <div> will be created on body el: someDomElementWhichTapContentWillBeWrittenTo // if you want tap output to console pass in true // if you don't then pass in false outPutToConsole: true // you can pass in styles to override default styles // if css is not passed default styles will be applied // // to apply no inline styles pass `false` css: // pass in selector to apply css to parts // may seem redundant but it makes this module // more '.tap-test.pass': background: '#0F0' '.tap-test.fail': background: '#F00' // this is a callback you can pass for when one test is finished one part // of the test {} // this is a callback you can pass for when one test is finished {} // this is a callback you can pass for when everything is finished {};
If you want to see more examples check the test folder.
License
MIT, see LICENSE.md for details.