1. @detools/tap-diff
The most human-friendly TAP reporter
@detools/tap-diff
Package: @detools/tap-diff
Created by: detools
Last modified: Tue, 05 Apr 2022 04:01:34 GMT
Version: 0.2.2
License: MIT
Downloads: 210
Repository: https://github.com/detools/tap-diff

Install

npm install @detools/tap-diff
yarn add @detools/tap-diff

@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

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code