> ## Documentation Index
> Fetch the complete documentation index at: https://bun.manicule.dev/llms.txt
> Use this file to discover all available pages before exploring further.
> For every page in one file, fetch https://bun.manicule.dev/llms-full.txt (large).
> To search and read these docs as tools, connect the MCP server at https://bun.manicule.dev/api/mcp.
> Every agent surface: https://bun.manicule.dev/.well-known/llms-manifest.json

# Run tests in watch mode with Bun (/guides/test/watch-mode)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 111 · updated: 2026-08-02 -->
Related: [Run your tests with the Bun test runner](/guides/test/run-tests.md), [Migrate from Jest to Bun's test runner](/guides/test/migrate-from-jest.md), [Mock functions in `bun test`](/guides/test/mock-functions.md), [Spy on methods in `bun test`](/guides/test/spy-on.md), [Set the system time in Bun's test runner](/guides/test/mock-clock.md), [Use snapshot testing in `bun test`](/guides/test/snapshot.md)

Use the `--watch` flag to run your tests in watch mode.

```sh icon="terminal" title="terminal" terminal
bun test --watch
```

***

Watch mode restarts the running Bun process whenever a file changes. It's fast. In this example, the editor saves the file on every keystroke.

<Frame>![Running tests in watch mode in
Bun](https://github.com/oven-sh/bun/assets/3084745/dc49a36e-ba82-416f-b960-1c883a924248)</Frame>

***

See [`bun test`](/test).
