Skip to content

Commit bf7bf23

Browse files
committed
fix test flakiness
1 parent ca6fa71 commit bf7bf23

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/test/repl/repl.spec.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,10 @@ test.suite('top level await', (_test) => {
168168
expect(elapsedTimeString).toMatch(/^\d+$/);
169169
const elapsedTime = Number(elapsedTimeString);
170170
expect(elapsedTime).toBeGreaterThanOrEqual(awaitMs - 50);
171-
expect(elapsedTime).toBeLessThanOrEqual(awaitMs + 100);
171+
// When CI is taxed, the time may be *much* greater than expected.
172+
// I can't think of a case where the time being *too high* is a bug
173+
// that this test can catch. So I've made this check very loose.
174+
expect(elapsedTime).toBeLessThanOrEqual(awaitMs + 10e3);
172175
}
173176
);
174177

0 commit comments

Comments
 (0)