Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/Aquaticat/Monochromatic. TypeScript and Rust monorepo: Claude Code and Pi coding-agent plugins, a m
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829303132333435363738394041/** Tests for `wait`. @module */
import { describe, expect, it,} from '@monochromatic-dev/module-test/ts';
import { wait, } from '../dist/final/neutral/index.mjs';
await describe({ name: wait.name, children: [ it({ name: 'resolves after the specified delay', fn: async () => { const DELAY = 20; const TOLERANCE = 5;
const start = performance.now(); await wait(DELAY,); const elapsed = performance.now() - start;
expect(elapsed,).toBeGreaterThanOrEqual(DELAY - TOLERANCE,); }, },),
it({ name: 'resolves to undefined', fn: async () => { const result = await wait(1,); expect(result,).toBeUndefined(); }, },), ],},);