Skip to content

Commit 5bc1256

Browse files
fix(codex): bracket setTimeout body to satisfy eslint no-promise-executor-return
The burst-dedup test awaited `new Promise<void>((resolve) => setTimeout(() => resolve(), 100))`. The arrow-body `() => resolve()` is flagged by eslint(no-promise-executor-return) because the implicit `return resolve()` is read as "return in Promise executor". Bracketing the body so resolve() is a statement (not an expression) clears the rule while keeping the test behavior identical. Caught by CI check-lint on the round-1 push.
1 parent 9bc565b commit 5bc1256

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

extensions/codex/src/node-cli-sessions.test.ts

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,9 @@ describe("runCodexExecResume stream error handling", () => {
319319
}),
320320
);
321321
await new Promise<void>((resolve) => {
322-
setTimeout(() => resolve(), 100);
322+
setTimeout(() => {
323+
resolve();
324+
}, 100);
323325
});
324326
const child = captured[0];
325327
expect(child).toBeDefined();
@@ -348,7 +350,9 @@ describe("runCodexExecResume stream error handling", () => {
348350
}),
349351
);
350352
await new Promise<void>((resolve) => {
351-
setTimeout(() => resolve(), 100);
353+
setTimeout(() => {
354+
resolve();
355+
}, 100);
352356
});
353357
const child = captured[0];
354358
expect(child).toBeDefined();
@@ -383,7 +387,11 @@ describe("runCodexExecResume stream error handling", () => {
383387
);
384388

385389
// Wait for the real child to attach so we can wrap its kill.
386-
await new Promise<void>((resolve) => setTimeout(() => resolve(), 100));
390+
await new Promise<void>((resolve) => {
391+
setTimeout(() => {
392+
resolve();
393+
}, 100);
394+
});
387395
const child = captured[0];
388396
expect(child).toBeDefined();
389397
const realKill = child!.kill.bind(child!);

0 commit comments

Comments
 (0)