@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;" />
24 lines • 602 B
JavaScript
// src/setupTests.ts
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;
}
}),
CopilotKitAgentDiscoveryError: jest.fn()
}));
jest.mock("react-dom/test-utils", () => ({
act: jest.fn((fn) => fn())
}));
//# sourceMappingURL=setupTests.mjs.map