From 9d684b6a6984c8bea90a1dfbe1b04435ed8a6265 Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 10 Feb 2026 19:53:34 -0800 Subject: [PATCH] fix: resolve TS2349 build error in ask-user-question test (#274) --- src/core/ask-user-question.test.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/ask-user-question.test.ts b/src/core/ask-user-question.test.ts index a4e6e00..995070b 100644 --- a/src/core/ask-user-question.test.ts +++ b/src/core/ask-user-question.test.ts @@ -154,10 +154,9 @@ describe('AskUserQuestion message interceptor', () => { }); // Simulate handleMessage with empty text - if (pendingQuestionResolver) { - pendingQuestionResolver(''); - pendingQuestionResolver = null; - } + // Non-null assertion needed: TS can't track the synchronous mutation from the Promise callback + pendingQuestionResolver!(''); + pendingQuestionResolver = null; const answer = await answerPromise; expect(answer).toBe('');