https://github.com/stchris/testzero
JS test runner without dependencies
https://github.com/stchris/testzero
javascript no-dependencies runner test testing
Last synced: 11 months ago
JSON representation
JS test runner without dependencies
- Host: GitHub
- URL: https://github.com/stchris/testzero
- Owner: stchris
- License: mit
- Created: 2019-03-30T20:34:13.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-03-30T21:21:27.000Z (about 7 years ago)
- Last Synced: 2025-03-25T21:27:08.279Z (over 1 year ago)
- Topics: javascript, no-dependencies, runner, test, testing
- Language: JavaScript
- Size: 4.88 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# testzero

test runner without dependencies
### Minimalistic API:
```javascript
const { assert, test, summary } = require('testzero');
test('works fine', () => {
assert([].length == 0);
});
summary();
```
### Minimalistic output:
`.` for successful tests, `x` for failed tests:
```bash
$ npm test
> example@1.0.0 test /Users/chris/src/testzero/example
> node tests
.xxxx
Successfully ran 1 test(s)
Failed 4 test(s):
works less fine
fails
fails as well
fails more often than not
npm ERR! Test failed. See above for more details.
```
## Installation
$ npm i testzero
or
$ yarn add testzero
## Usage
* define `tests/index.js` to `require` your tests
* optionally: call `summary()`
* write tests in `.test.js` files
* add `npm tests` as a script
Check the [example project](https://github.com/stchris/testzero/blob/master/example/).