UNPKG

@copilotkit/react-core

Version:

<img src="https://github.com/user-attachments/assets/0a6b64d9-e193-4940-a3f6-60334ac34084" alt="banner" style="border-radius: 12px; border: 2px solid #d6d4fa;" />

29 lines 823 B
// src/setupTests.ts import { z } from "zod"; jest.mock("@segment/analytics-node", () => ({ Analytics: jest.fn().mockImplementation(() => ({ track: jest.fn(), identify: jest.fn(), page: jest.fn(), group: jest.fn(), alias: jest.fn() })) })); jest.mock("@copilotkit/shared", () => ({ parseJson: jest.fn((jsonString, defaultValue) => { try { return JSON.parse(jsonString); } catch (e) { return defaultValue; } }), dataToUUID: jest.fn((data) => JSON.stringify(data)), getZodParameters: jest.fn(() => z.object({})), randomId: jest.fn(() => "test-random-id"), CopilotKitAgentDiscoveryError: jest.fn(), randomUUID: jest.fn(() => "mock-thread-id") })); jest.mock("react-dom/test-utils", () => ({ act: jest.fn((fn) => fn()) })); //# sourceMappingURL=setupTests.mjs.map