Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

A tap/tape reporter which adds a dom element to the dom and can be styled easily

Resources

License

Releases

No releases published
You can’t perform that action at this time.