@myndzi/unc
v1.0.0
Published
Minimal describe/it test runner printing TAP, with no dependencies, for very old Node versions and up
Readme
@myndzi/unc
A small describe/it test runner with no dependencies. It's a single ES5 file that runs on Node 0.10 and up, and prints TAP.
It's meant for verifying old packages across many Node versions. It doesn't include assertions, so bring your own (assert, should, and so on).
npm install --save-dev @myndzi/unc{ "scripts": { "test": "unc test.js" } }API
These are provided as globals, and work like their mocha equivalents:
describe(name, fn),describe.skip,xdescribeit(name, fn, [timeoutMs]),it.skip,xit; anitwith no function is skippedbefore,after,beforeEach,afterEachthis.timeout(ms)inside a test or hook;this.slow()is accepted and ignored
Tests can be synchronous, take a done callback, or return a promise. The default timeout is 2 seconds.
Exit codes
| Code | Meaning | |---|---| | 0 | Everything passed | | 1 | A test failed, a file couldn't load, no tests were found, or the process exited early | | 2 | No test files were given |
File arguments aren't expanded by unc, so rely on the shell for patterns like test/*.js.
Credits
Written by Claude (Claude Opus 5.5, by Anthropic), with design direction from myndzi.
