Runtime
Bundler
Package Manager
Test Runner
Guides
Reference
Blog
Install Bun
Guides Test Runner

Run tests in watch mode with Bun

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

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.

Running tests in watch mode in
Bun


See bun test.

On this page

No Headings