A tap/tape reporter which adds a dom element to the dom and can be styled easily
JavaScript CSS HTML
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
images
test
.gitignore
LICENSE.md
README.md
index.js
package.json

README.md

tap-browser-el

experimental

tap-brower-el default stypes

A tap/tape reporter which adds a dom element to the dom

Usage

NPM

tap-browser-el will override console.log and watch what's being pushed to it and parse any tap/tape content.

Example:

require('tap-browser-el')( {
    // 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
    onFinishedTestPart: function() {}.

    // this is a callback you can pass for when one test is finished
    onFinishedTest: function() {},

    // this is a callback you can pass for when everything is finished
    onFinished: function() {}
});

If you want to see more examples check the test folder.

License

MIT, see LICENSE.md for details.