fix: resolve TS2349 build error in ask-user-question test (#274)

This commit is contained in:
Cameron
2026-02-10 19:53:34 -08:00
committed by GitHub
parent 9a0dddebcc
commit 9d684b6a69

View File

@@ -154,10 +154,9 @@ describe('AskUserQuestion message interceptor', () => {
}); });
// Simulate handleMessage with empty text // Simulate handleMessage with empty text
if (pendingQuestionResolver) { // Non-null assertion needed: TS can't track the synchronous mutation from the Promise callback
pendingQuestionResolver(''); pendingQuestionResolver!('');
pendingQuestionResolver = null; pendingQuestionResolver = null;
}
const answer = await answerPromise; const answer = await answerPromise;
expect(answer).toBe(''); expect(answer).toBe('');