Skip to content

fix(test): match jose transform paths on Windows - #1315

Merged
samanhappy merged 1 commit into
samanhappy:mainfrom
remote-controlled-man:codex/mcphub-jose-windows-jest
Oct 12, 2026
Merged

samanhappy merged 1 commit into
samanhappy:mainfrom
remote-controlled-man:codex/mcphub-jose-windows-jest

Conversation

@remote-controlled-man

Copy link
Copy Markdown
Contributor

Jest cannot load eleven suites on Windows after #1295 added a transform for the ESM-only jose package. The rule uses / separators, while Jest passes native Windows paths, so the transform does not match and the suites fail with Unexpected token 'export' before executing their tests.

Accept both / and \ at each directory boundary in that rule. The existing ts-jest CommonJS transform and options remain the same; the other transforms, module mappings, ignore patterns, dependencies and production code are unchanged.

Validation on Windows, Node 22.20.0 and pinned pnpm 10.12.4:

  • Fresh independent base-config replay: all eleven affected suites fail to load, zero tests execute, with the same export syntax error.
  • Fresh head run of those same suites, with --maxWorkers=2 --no-cache: eleven suites and 168 tests pass. The existing worker teardown warning is still present.
  • Nine POSIX/Windows/negative regex cases and the actual installed Windows pnpm jose path pass; the remaining config is identical.
  • Earlier full bounded runs changed from 21 failed / 223 passed suites to 10 failed / 234 passed, and from 22 failed / 2,119 passed tests to 22 failed / 2,287 passed. Those ten baseline failures remain, including the separately investigated MCPB Windows upload defect and nine other failures already present on the base. This is not a full-suite pass.

The full suite and builds were not rerun during this independent review. No Linux or hosted-CI execution is claimed. This self-discovered portability regression needs no new issue or changes to CI workflows.

The jose transform introduced by samanhappy#1295 matches only POSIX separators.
On Windows, eleven affected suites fail during loading with Unexpected
token export, so their tests do not execute.

Match both native separator conventions in this transform while keeping
its ts-jest CommonJS options and the remaining config unchanged. The eleven
affected suites and 168 tests pass on Windows after this change. Other
baseline full-suite failures remain outside this fix.
Copilot AI balanced review requested due to automatic review settings October 12, 2026 06:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@codecov

codecov Bot commented Oct 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@0ee8100). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1315   +/-   ##
=======================================
  Coverage        ?   60.36%           
=======================================
  Files           ?      232           
  Lines           ?    19281           
  Branches        ?     4839           
=======================================
  Hits            ?    11639           
  Misses          ?     6065           
  Partials        ?     1577           
Flag Coverage Δ
unittests 60.36% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused regex change correctly matches POSIX and Windows paths without broadening unrelated transforms.

0 open findings

🧠 Review effort: Balanced

@samanhappy
samanhappy merged commit dcb7a21 into samanhappy:main Oct 12, 2026
4 checks passed
@remote-controlled-man
remote-controlled-man deleted the codex/mcphub-jose-windows-jest branch October 13, 2026 01:34
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.

3 participants