Skip to content

Conversation

@ammar-agent
Copy link
Collaborator

Fixes spurious coverage collection errors in CI.

Changes

  • Coverage Config: Excluded src/browser/api.ts (browser-only deps) and src/cli/**/* from Jest coverage.
  • Jest Compatibility: Swapped import.meta.env.DEV for process.env.NODE_ENV in MapStore.ts and useGitBranchDetails.ts to allow these files to be parsed by Jest without syntax errors.
  • TS Config: Updated Jest's TS target to ES2023 to support modern methods like Array.prototype.at().

Generated with mux

- Exclude src/browser/api.ts and src/cli from coverage to avoid environment mismatches
- Replace import.meta.env with process.env.NODE_ENV in shared code for Jest compatibility
- Update Jest TS config to support ES2023 (Array.at)
- Fix missing module errors by ensuring version.ts is generated or mocked
@ammario ammario merged commit 085f22c into main Nov 24, 2025
18 of 19 checks passed
@ammario ammario deleted the fix-coverage-step-errors branch November 24, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants