Slide 9
Slide 9 text
Test Runner Example
import test from 'node:test';
import assert from 'node:assert';
test('top level test', async (t) => {
await t.test('subtest 1', (t) => {
assert.strictEqual(1, 1);
});
await t.test('subtest 2', (t) => {
assert.strictEqual(2, 2);
});
});
$ node test.mjs
TAP version 13
ok 1 - subtest 1
---
duration_ms: 0.000283375