Something went wrong. Try again.
Something went wrong. Try again.
123456789101112131415import { delay } from "../../src/async/delay";
describe("delay = (time: number, unit: 'min' | 's' | 'ms') => Promise<void>", () => { it("delays by the specified amount", async () => { const start = performance.now();
await delay(200);
const time = performance.now() - start;
expect(time).toBeGreaterThanOrEqual(200); expect(time).toBeLessThanOrEqual(205); });});