Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dhershman1/tap-on
Get test feedback in a nice way
https://github.com/dhershman1/tap-on
formatter output stream tap tape testing
Last synced: about 1 month ago
JSON representation
Get test feedback in a nice way
- Host: GitHub
- URL: https://github.com/dhershman1/tap-on
- Owner: dhershman1
- License: mit
- Created: 2021-02-24T18:24:31.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-01-28T20:55:38.000Z (11 months ago)
- Last Synced: 2024-08-10T21:16:44.401Z (4 months ago)
- Topics: formatter, output, stream, tap, tape, testing
- Language: JavaScript
- Homepage:
- Size: 346 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# tap-on
[![npm](https://img.shields.io/npm/v/tap-on.svg?style=flat-square)](https://www.npmjs.com/package/tap-on)
Another [tape](https://github.com/substack/tape)/tap output formatter for running tests
I built this package primarily to use with tape, and its tap output. The biggest issue with tap is that the way its output is structured can almost be anything.
If you need or want to use tap-on and it comes out ugle, or just flat out doesn't work please open an issue! I will be glad to help!
## Parameters
- `-s, --stack`: This param will **hide** the stack trace in the fail messages you will still see the **at** however
- `-u, --summarize`: Enables failure summaries at the **END** of your test report, useful if you have a lot of tests!
- `--no-color`: Disables colored output, and only keeps the icons, and spacing## Installation
```
npm i -D tap-on
```## Usage
You can simply pass your tap output into `tap-on` through a pipe or other means
```
tape test/*.js | tap-ontape test/*.js | tap-on -u -s
node test.js | ./node_modules/tap-on/bin/tap-on -u
tap-on -u < src/test/non-tape.tap
```## Output
The output was built to look a bit like the [tap-spec](https://github.com/scottcorgan/tap-spec) module but without some dependencies like Lodash.
The stats at the bottom work like so:
- `Total`: Total number of tests run
- `Passed`: Total passing tests
- `Failed`: Total failing tests
- `Skipped`: Total **SKIPPED** tests (**NOT** skipped assertions)
- `Duration`: Total time took to runHere are some examples of the output:
![on-tap-example1](https://user-images.githubusercontent.com/8997380/120860729-25617200-c554-11eb-9a72-165598830599.png)
![on-tap-example2](https://user-images.githubusercontent.com/8997380/120860730-25617200-c554-11eb-9e55-7026b416f2c8.png)
![on-tap-example3](https://user-images.githubusercontent.com/8997380/120860727-24c8db80-c554-11eb-85ef-ccff03ab267a.png)