tinytest
Source: lib/tinytest.js
The test library of tests/unittests/: zero dependencies, qjs/qjsm exit status 1 on a failure (a browser page turns red). Adapted from jstinytest.
import { tests, assert, eq } from 'tinytest';
tests({
'adds'() {
assert(1 + 1 == 2);
eq([1, 2], [1, 2]);
},
});A test file whose first lines contain @portable also runs under node, bun and deno.
Export list
Generated by utilities/doc-api.js from the tinytest dump of utilities/api-surface.sh: 6 members. Edit the text above this block, not the block.
Functions: assert(), assertEquals(), assertStrictEquals(), eq(), fail(), tests()