fix: react key warnings from duplicate message IDs + establish jest testing framework (#655)

* fix: resolve issue #588 - react key warnings from duplicate message IDs + establish jest testing framework

* Update the makefile and workflow with the js test

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
Willem Jiang
2025-10-25 20:46:43 +08:00
committed by GitHub
parent f2be4d6af1
commit 1d71f8910e
15 changed files with 4067 additions and 91 deletions

View File

@@ -0,0 +1,19 @@
// Mock store for testing without ESM module dependencies
export const mockUseStore = {
getState: jest.fn(() => ({
responding: false,
messageIds: [] as string[],
messages: new Map(),
researchIds: [] as string[],
researchPlanIds: new Map(),
researchReportIds: new Map(),
researchActivityIds: new Map(),
ongoingResearchId: null,
openResearchId: null,
appendMessage: jest.fn(),
updateMessage: jest.fn(),
updateMessages: jest.fn(),
})),
setState: jest.fn(),
};