MCPcopy Index your code
hub / github.com/bytecodealliance/ComponentizeJS / test

Function test

test/builtins/now.js:13–20  ·  view source on GitHub ↗
(run)

Source from the content-addressed store, hash-verified

11`;
12
13export async function test(run) {
14 const curNow = Date.now();
15 const { stdout, stderr } = await run();
16 strictEqual(stderr, '');
17 const times = stdout.split('\n');
18 ok(Number(times[0]) > curNow);
19 ok(times[1] - times[0] > 0);
20}

Callers 2

api.jsFile · 0.50
wasi.jsFile · 0.50

Calls 1

runFunction · 0.50

Tested by

no test coverage detected