mirror of
https://github.com/nodejs/node.git
synced 2026-11-26 21:58:26 -05:00
PR-URL: https://github.com/nodejs/node/pull/57304 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
18 lines
345 B
JavaScript
18 lines
345 B
JavaScript
import test from 'node:test';
|
|
|
|
test('should pass when assertions are eventually met', async (t) => {
|
|
t.plan(1, { wait: true });
|
|
|
|
setTimeout(() => {
|
|
t.assert.ok(true);
|
|
}, 250);
|
|
});
|
|
|
|
test('should fail when assertions fail', async (t) => {
|
|
t.plan(1, { wait: true });
|
|
|
|
setTimeout(() => {
|
|
t.assert.ok(false);
|
|
}, 250).unref();
|
|
});
|