Skip to content
NewBun 1.4.5 is out. Release notes
AphrodyBun

Guides · Test Runner

Set a per-test timeout with the Bun test runner

Change the default 5-second per-test timeout of bun test with the --timeout flag.

Use the --timeout flag to set a timeout for each test in milliseconds. Bun marks a test that exceeds this timeout as failed.

The default timeout is 5000 (5 seconds).

bun test --timeout 3000 # 3 seconds

See bun test.