-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Closed
Description
Summary
The timeout field in [test] section of packages/opencode/bunfig.toml does not actually take effect:
[test]
preload = ["./test/preload.ts"]
timeout = 10000 # 10 seconds (default is 5000ms)Why it doesn't work
Bun's bunfig.toml parser (src/bunfig.zig in oven-sh/bun) does not parse the timeout field from the [test] section. The field is silently ignored, and the default 5000ms timeout is used instead.
This can be verified by:
- Setting
timeout = 10000in bunfig.toml - Running a test that sleeps for 6 seconds (longer than the 5s default but shorter than the configured 10s)
- The test times out at 5000ms, proving the config is ignored
Context
- Bun's official docs incorrectly document this as a supported feature, but the implementation doesn't exist
- Feature request: config gloabl test timeout in bunfig.toml oven-sh/bun#7789 (open since Dec 2023)
- The CLI flag
--timeoutworks correctly — only the bunfig.toml config is broken
Suggested fix
Use --timeout in the test script in package.json instead:
{
"scripts": {
"test": "bun test --timeout 10000"
}
}Tested on Bun 1.3.9.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels