diff --git a/src/bun.js/test/jest.zig b/src/bun.js/test/jest.zig index ab6c6163ebd6eb..3dcaacf0219334 100644 --- a/src/bun.js/test/jest.zig +++ b/src/bun.js/test/jest.zig @@ -1428,7 +1428,7 @@ pub const TestRunnerTask = struct { const elapsed = now.duration(&this.started_at).ms(); this.ref.unref(this.globalThis.bunVM()); this.globalThis.throwTerminationException(); - this.handleResult(.{ .fail = expect.active_test_expectation_counter.actual }, .{ .timeout = elapsed }); + this.handleResult(.{ .fail = expect.active_test_expectation_counter.actual }, .{ .timeout = @intCast(@max(elapsed, 0)) }); } const ResultType = union(enum) {