retset
v1.0.5
Published
Minimal Node.js test runner
Downloads
1
Maintainers
Readme
retset
if you run node > 19 use
node:test
- super simple (stupid) test runner using node's built-in
assert
module - no dependencies
- almost no code
- use ava for heavier testing
npm i -D retset
import test from 'retset'
// default assertion: strictEqual
test('the function returns what we expect', theFunction(), 'what we expect')
// use any assert method: https://nodejs.org/api/assert.html
test.notStrictEqual('numbers are not strings', 123, '123')
// async
test.deepEqual('response', fetchApi(), expectedObject)
// reminder for later
test.skip('compare apples to oranges')
// commentary
test('3 === 3', 3, 3, 'three is the magic number')
// tidy console output
test.group('level-1')
test.label('level-2')