0.1.0 • Published 5 years ago

testzero v0.1.0

Weekly downloads
1
License
MIT
Repository
-
Last release
5 years ago

testzero

test runner without dependencies

Minimalistic API:

const { assert, test, summary } = require('testzero');

test('works fine', () => {
	assert([].length == 0);
});

summary();

Minimalistic output:

. for successful tests, x for failed tests:

$ 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.

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.