Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axross/tap-diff
:dancers: The most human-friendly TAP reporter.
https://github.com/axross/tap-diff
Last synced: 4 days ago
JSON representation
:dancers: The most human-friendly TAP reporter.
- Host: GitHub
- URL: https://github.com/axross/tap-diff
- Owner: axross
- License: mit
- Created: 2015-11-13T08:28:55.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-09-10T08:53:40.000Z (over 3 years ago)
- Last Synced: 2024-05-01T20:30:05.393Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 351 KB
- Stars: 93
- Watchers: 2
- Forks: 26
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-tap - tap-diff - Human-friendly output with diffing. (Reporters / JavaScript)
README
# tap-diff
[![npm version](https://badge.fury.io/js/tap-diff.svg)](http://badge.fury.io/js/tap-diff)
The most human-friendly [TAP reporter](https://github.com/substack/tape#pretty-reporters).
![Screenshot](screenshot1.png)
![Screenshot](screenshot2.png)
## How to use
You can use tap-diff in the same way as other [TAP reporters](https://github.com/substack/tape#pretty-reporters).
```
npm install -g tap-diff
``````
tape ./*.test.js | tap-diff
```tap-diff uses [chalk](https://www.npmjs.com/package/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()`:
```javascript
'use strict'const test = require('tape')
const tapDiff = require('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