[GH-ISSUE #5777] Fix convertTo.test.js export format expectations #5571

Closed
opened 2026-06-07 16:36:42 -04:00 by yindo · 1 comment
Owner

Originally created by @Delqhi on GitHub (Jun 7, 2026).
Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5777

Problem

6 tests in server/tests/utils/helpers/convertTo.test.js fail with expectation mismatches in the chat export format. The test expects a specific JSON/JSONL structure but prepareChatsForExport returns data in a different shape.

Likely Root Cause

The test was written against an earlier version of the export function. Either:

  1. prepareChatsForExport changed its output format and tests were not updated, or
  2. Test fixtures (chatExample) do not match the current expected data structure.

Failing Tests

  • All tests in describe('prepareChatsForExport', ...) block (6 tests)

Suggested Approach

  1. Read server/utils/helpers/chat/convertTo.js to understand current output format
  2. Read the test file to see what format is expected
  3. Update either the function or the test expectations to match
  4. Verify export still works end-to-end with a real workspace

Related to #34 (Jest config fix) — uncovered during test suite cleanup.

Originally created by @Delqhi on GitHub (Jun 7, 2026). Original GitHub issue: https://github.com/Mintplex-Labs/anything-llm/issues/5777 ## Problem 6 tests in server/__tests__/utils/helpers/convertTo.test.js fail with expectation mismatches in the chat export format. The test expects a specific JSON/JSONL structure but prepareChatsForExport returns data in a different shape. ## Likely Root Cause The test was written against an earlier version of the export function. Either: 1. prepareChatsForExport changed its output format and tests were not updated, or 2. Test fixtures (chatExample) do not match the current expected data structure. ## Failing Tests - All tests in describe('prepareChatsForExport', ...) block (6 tests) ## Suggested Approach 1. Read server/utils/helpers/chat/convertTo.js to understand current output format 2. Read the test file to see what format is expected 3. Update either the function or the test expectations to match 4. Verify export still works end-to-end with a real workspace Related to #34 (Jest config fix) — uncovered during test suite cleanup.
yindo closed this issue 2026-06-07 16:36:42 -04:00
Author
Owner

@Delqhi commented on GitHub (Jun 7, 2026):

Wrong repo, created in error

<!-- gh-comment-id:4642693350 --> @Delqhi commented on GitHub (Jun 7, 2026): Wrong repo, created in error
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Mintplex-Labs/anything-llm#5571