fix: resolve TS2349 build error in ask-user-question test (#274)
This commit is contained in:
@@ -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('');
|
||||||
|
|||||||
Reference in New Issue
Block a user