CI Failure: 32 tests in loader.test.ts failing after refactor #8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
CI Failure Report
Workflow: feat: refactor
Commit:
1d0f616faeRun: https://git.brads.house/dungeonchurch/5e-tools-mcp/actions/runs/3411
Triage Analysis
Root Cause
The CI failure is in
tests/loader.test.ts- 32 out of 91 tests failed. All failures are in the "loadAll against live data" test suite.The tests expect the data loader to populate various data stores (monsters, spells, items, feats, races, etc.), but the loader is returning empty results.
Evidence
From the log, the loader attempts to load data from temp directories (e.g.,
/tmp/5etools-test-6oZrIq/) but encounters ENOENT errors for all expected data files:The loader only successfully loaded minimal test data:
Test Failures
All 32 failing tests have the same pattern:
expected 0 to be greater than XExamples:
expected 0 to be greater than 0- loads monster from subdirectoryexpected 0 to be greater than 1000- populates byUri with a substantial number of entriesexpected 0 to be greater than 30- loads diseases into condition kindContext
This is a major refactor commit (PR #7, 9778 additions, 2384 deletions) that:
src/loader.ts,src/bootstrap.ts,src/helpers.ts)tests/loader.test.tsThe "loadAll against live data" test suite appears to rely on test fixtures being present, but after the refactor the fixture setup is not copying the expected JSON files to the test temp directories.
Recommendation
@brad The test fixture setup in
tests/loader.test.tsneeds to be updated to properly populate the test temp directories with the required data files. The refactor likely changed how test data is managed or the loader's expectations for file locations. Review the test'sbeforeAllor setup code to ensure fixture files are copied to the temp directory before tests run.