Skip to content

Commit 117ebb7

Browse files
kriszypclaude
andcommitted
test: initialize pollUntil lastErr with default timeout error (#1210 Gemini feedback)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent d563bee commit 117ebb7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

integrationTests/apiTests/ttl.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const skipSuite = process.platform === 'win32' || process.env.HARPER_RUNTIME ===
3333
/** Poll until `fn` resolves without throwing, or throw the last error after `maxWaitMs`. */
3434
async function pollUntil(fn: () => Promise<void>, maxWaitMs = MAX_WAIT_MS): Promise<void> {
3535
const deadline = Date.now() + maxWaitMs;
36-
let lastErr: unknown;
36+
let lastErr: Error = new Error(`pollUntil timed out after ${maxWaitMs}ms`);
3737
while (Date.now() < deadline) {
3838
try {
3939
await fn();

0 commit comments

Comments
 (0)