Détail du package

@detools/tap-diff

detools5.6kMIT0.2.2

The most human-friendly TAP reporter

tap, tape, ava, test

readme

@detools/tap-diff

npm version MIT Licence

The most human-friendly TAP reporter.

Screenshot

Screenshot

How to use

You can use @detools/tap-diff in the same way as other TAP reporters.

npm install -g @detools/tap-diff
tape ./*.test.js | tap-diff

@detools/tap-diff uses chalk for adding color, which automatically detects color terminals. If you're piping the output and want to force color:

FORCE_COLOR=t tape ./*.test.js | tap-diff

Or use with createStream():

'use strict'

const test = require('tape')
const tapDiff = require('@detools/tap-diff')

test.createStream()
  .pipe(tapDiff())
  .pipe(process.stdout)

test('timing test', (t) => {
  t.plan(2)
  t.equal(typeof Date.now, 'function')
  var start = Date.now()

  setTimeout(() => {
    t.equal(Date.now() - start, 100)
  }, 100)
})

License

MIT

changelog

0.2.2

Fixed

  • Build es5 compatible code

0.2.1

Fixed

  • tap-parser now exports a constructor. Use new keyword to initialize it

0.2.0

Updated

  • Outdated dependecies