From 47f4126802386a56139885b67c30fa5527fa75ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Fri, 13 Feb 2026 23:11:01 +0800 Subject: [PATCH] fix(test): move timeout config to CLI flag `[test] timeout` in bunfig.toml is not actually parsed by Bun's config loader (src/bunfig.zig). The setting was silently ignored, falling back to the default 5000ms instead of the intended 30000ms. Move the timeout to `--timeout` CLI flag in the test script, which works correctly. Ref: https://github.com/oven-sh/bun/issues/7789 --- packages/opencode/bunfig.toml | 4 +++- packages/opencode/package.json | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/opencode/bunfig.toml b/packages/opencode/bunfig.toml index c4617527d030..c3b727076493 100644 --- a/packages/opencode/bunfig.toml +++ b/packages/opencode/bunfig.toml @@ -2,4 +2,6 @@ preload = ["@opentui/solid/preload"] [test] preload = ["./test/preload.ts"] -timeout = 30000 # 30 seconds - allow time for package installation +# timeout is not actually parsed from bunfig.toml (see src/bunfig.zig in oven-sh/bun) +# using --timeout in package.json scripts instead +# https://github.com/oven-sh/bun/issues/7789 diff --git a/packages/opencode/package.json b/packages/opencode/package.json index 82d562bb093b..03e58c02974e 100644 --- a/packages/opencode/package.json +++ b/packages/opencode/package.json @@ -7,7 +7,7 @@ "private": true, "scripts": { "typecheck": "tsgo --noEmit", - "test": "bun test", + "test": "bun test --timeout 30000", "build": "bun run script/build.ts", "dev": "bun run --conditions=browser ./src/index.ts", "random": "echo 'Random script updated at $(date)' && echo 'Change queued successfully' && echo 'Another change made' && echo 'Yet another change' && echo 'One more change' && echo 'Final change' && echo 'Another final change' && echo 'Yet another final change'",