Skip to content

Commit df9a927

Browse files
fix(test): increase timeout in duration test to prevent flakiness
The test was flaky because it expected >= 10ms duration after sleeping for 10ms, but due to timer precision and measurement overhead, it sometimes received 9ms. Increasing the sleep to 50ms provides sufficient buffer while still testing the duration measurement functionality. Fixes #507
1 parent e81002b commit df9a927

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cli/doctor/runner.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ describe("runner", () => {
3030
name: "Test Check",
3131
category: "installation",
3232
check: async () => {
33-
await new Promise((r) => setTimeout(r, 10))
33+
await new Promise((r) => setTimeout(r, 50))
3434
return { name: "Test", status: "pass", message: "OK" }
3535
},
3636
}

0 commit comments

Comments
 (0)