tap-spec-dom

0.2.0 • Public • Published

tap-spec-dom

TAP output formatted for the DOM

Usage

npm install --save-dev tap-spec-dom
const tape = require('tape')
const tapSpecDOM = require('tap-spec-dom')

// the container element for the tests
const tests = document.getElementById('tests')

// pass the element and tape stream to tapSpecDOM
tapSpecDOM(tests, tape.createStream({ objectMode: true })) 

tape('timing test', t => {
  t.equal(typeof Date.now, 'function')
  t.equal(99 + 1, 101, 'simple arithmetic')
  t.end()
})

Add tap-spec-dom.css to your document for some styling or create your own

Running Tests

Run the servers:

npm run server
npm run selenium

Then run the tests:

npm test

The diff might fail because your resolution is different (TODO: set resolution on test), but it should look similar

Screenshot

Package Sidebar

Install

npm i tap-spec-dom

Weekly Downloads

0

Version

0.2.0

License

MIT

Unpacked Size

37.7 kB

Total Files

10

Last publish

Collaborators

  • ristostevcev