Skip to content
bouzuya's easy test runner
TypeScript
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
images
src
test
.gitignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json
tsconfig.json

README.md

beater logo

beater: bouzuya's easy test runner. beater is inspired by eater.

Features

  • Only 3 functions:
    1. test()
    2. run()
    3. runWithOptions()
  • You can use your favorite assert().
  • You can use your favorite reporter.
  • You can use TypeScript (2.x *.d.ts is included).

Usage

1. Install

$ npm install beater

2. Write test

// test/index.js
const assert = require('assert');
const { run, test } = require('beater');

const test1 = test('simple test', () => {
  assert(1 + 1 === 20); // fail
});

const test2 = test('async test', () => {
  return new Promise((resolve) => {
    assert(1 + 1 === 200); // fail
    resolve();
  });
});

run([test1, test2]).catch(() => process.exit(1));

3. Run

$ node test/index.js

Related Packages

Badges

npm version Travis CI

License

MIT

Author

bouzuya <m@bouzuya.net> (https://bouzuya.net/)

You can’t perform that action at this time.