https://github.com/madlittlemods/safe-tape-runner
Tape runner that always exits with code 0
https://github.com/madlittlemods/safe-tape-runner
Last synced: 2 months ago
JSON representation
Tape runner that always exits with code 0
- Host: GitHub
- URL: https://github.com/madlittlemods/safe-tape-runner
- Owner: MadLittleMods
- Created: 2015-10-09T02:36:12.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-10-09T04:30:33.000Z (over 9 years ago)
- Last Synced: 2025-02-12T22:18:09.540Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 145 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# Safe Tape Runner
A tape runner that always exits with code `0`. This allows us to play nice on Windows and keep our npm scripts composable.
Exiting with the right code should be the reporters job anyway.
### But what about CI?
See the [usage section](https://github.com/MadLittleMods/safe-tape-runner#usage). Just pipe to a reporter like [`tap-spec`](https://www.npmjs.com/package/tap-spec).
## Latest version: `v0.1.3`
### [Changelog](https://github.com/MadLittleMods/safe-tape-runner/blob/master/CHANGELOG.md)
### Install
`npm install safe-tape-runner --save-dev`
# Usage
```
safe-tape-runner test.js
```If you pipe to a reporter like [`tap-spec`](https://www.npmjs.com/package/tap-spec), it will exit with the proper code, `0` for passing and `1` for failing.
```
safe-tape-runner test.js | tap-spec
```You can also use glob patterns because we pass through to [`babel-tape-runner`](babel-tape-runner):
```
safe-tape-runner lib/**/__tests__/*-test.js
```## Usage in `package.json`
`package.json`
```json
{
"scripts": {
"test": "npm run test-unformatted | tap-spec",
"test-unformatted": "safe-tape-runner ./tests/test.js"
},
}
```# Testing
`npm test`