New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement bun test --timeout
#3040
Conversation
You can change the default per-test timeout in `bun test`: > bun test --timeout 10 The default timeout is 5000.
@@ -360,8 +358,6 @@ pub const TestRunner = struct { | |||
only: bool = false, | |||
last_file: u64 = 0, | |||
|
|||
timeout_seconds: f64 = 5.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was unused.
@@ -35,8 +35,6 @@ const getAllocator = @import("../base.zig").getAllocator; | |||
const JSPrivateDataPtr = @import("../base.zig").JSPrivateDataPtr; | |||
const GetJSPrivateData = @import("../base.zig").GetJSPrivateData; | |||
|
|||
const default_timeout = std.time.ms_per_min * 5; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed from std.time.ms_per_min
to std.time.ms_per_s
. This appeared to be a bug, since the default should be 5 seconds, not 5 minutes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
❌ @Electroid 27 files with test failures on linux-x64:
|
❌ @Electroid 28 files with test failures on linux-x64-baseline:
|
❌ @Electroid 28 files with test failures on bun-darwin-x64-baseline:
|
|
You can now change the default per-test timeout in
bun test
with the--timeout
flag.bun test --timeout 10
However, this does not change the timeout when
test(fn, timeout)
is used, such as: