Skip to content

Commit 7773498

Browse files
docs(test): match comment to setImmediate microtask flush
CodeRabbit nit on the test additions: the explanatory comment said the test awaits Promise.resolve() to flush the .catch microtask but the code uses setImmediate. Updated the comment to match the actual implementation.
1 parent 152939b commit 7773498

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/activate/__tests__/registerCommands.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ describe("registerCommands handlers", () => {
292292
// postMessageToWebview sites in registerCommands.ts (settingsButtonClicked
293293
// posts twice, plus historyButtonClicked, marketplaceButtonClicked, and
294294
// acceptInput). Each handler is synchronous, so the .catch arm runs on a
295-
// microtask; awaiting Promise.resolve() flushes it before we assert. The
295+
// microtask; setImmediate ensures all microtasks are flushed before we assert. The
296296
// log messages carry a `[<handlerName>]` prefix so multi-failure logs
297297
// remain unambiguous; the prefix is per-handler, not per-call (both of
298298
// settingsButtonClicked's posts share the same prefix).

0 commit comments

Comments
 (0)