# test.build/core/timers/base.timer.test.ts

> 10 lines of code and 0 definitions.

Tree: Codebase Testing
Language: typescript
Canonical: https://banes-lab.com/anatomy/testing#file-testing-test-build-core-timers-base-timer-test-ts
Source text: https://banes-lab.com/source/testing/test.build/core/timers/base.timer.test.ts.txt

Listed in [test.build/core/timers](https://banes-lab.com/api/source/testing/test.build/core/timers.md).

## Contained in

- [test.build/core/timers](https://banes-lab.com/anatomy/testing/folder-testing-test-build-core-timers.md)

## Source

```typescript
import { describe, expect, it } from "vitest";
import { wait } from "@banes-lab/build-scripts/core/timers/base.timer.ts";

const SHORT_MS = 5;

describe("wait", () => {
    it("resolves after at least the requested delay", async () => {
        const before = Date.now();
        await wait(SHORT_MS);
        expect(Date.now() - before).toBeGreaterThanOrEqual(SHORT_MS - 1);
    });
});
```
