Skip to content

Commit 2ff483d

Browse files
committed
Fix failing unit tests
1 parent 632c93d commit 2ff483d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/elements/__tests__/prompt-input.test.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,9 @@ describe("PromptInputSpeechButton", () => {
10691069
};
10701070

10711071
// @ts-expect-error - Mocking browser API
1072-
window.SpeechRecognition = () => mockRecognition;
1072+
window.SpeechRecognition = vi.fn(function (this: any) {
1073+
return mockRecognition;
1074+
});
10731075
});
10741076

10751077
afterEach(() => {

0 commit comments

Comments
 (0)