diff --git a/packages/chat-headless/tests/chatheadless.test.ts b/packages/chat-headless/tests/chatheadless.test.ts index 86aa714..0eae889 100644 --- a/packages/chat-headless/tests/chatheadless.test.ts +++ b/packages/chat-headless/tests/chatheadless.test.ts @@ -30,10 +30,11 @@ const mockedMetaState: MetaState = { beforeEach(() => { jest.spyOn(coreLib, "provideChatCore").mockImplementation(() => { - return { + const client: ChatHttpClient = { getNextMessage: jest.fn(), - on: jest.fn(), - } as Partial as ChatHttpClient; + streamNextMessage: jest.fn(), + }; + return client; }); localStorage.clear(); });