Skip to content

Make jest esm compatible - #1147

Merged
tnotheis merged 5 commits into
mainfrom
make-jest-esm-compatible
Aug 19, 2026
Merged

Make jest esm compatible#1147
tnotheis merged 5 commits into
mainfrom
make-jest-esm-compatible

Conversation

@tnotheis

Copy link
Copy Markdown
Member

Readiness checklist

  • I ensured that the PR title is good enough for the changelog.
  • I labeled the PR.
  • I added tests (if necessary).
  • I self-reviewed the PR.

Run package test scripts with Node VM modules so Jest can evaluate native ESM.

Configure ts-jest to treat TypeScript tests as ESM, remove the Babel CommonJS bridge for .mjs dependencies, and keep test type-checking compatible with ESM-only dependency declarations.
Import the Jest API from @jest/globals where tests call jest.* directly.

Replace CommonJS __dirname usage in test helpers and asset reads with import.meta.url based file paths.
Let test tsconfigs use ES2022 module output directly so ts-jest can run without an inline module override.

Drop explicit node10 module resolution and the matching TypeScript deprecation suppression from test configs.
@tnotheis tnotheis self-assigned this Aug 19, 2026
@tnotheis tnotheis added the test This pull request contains only new or changed tests label Aug 19, 2026
tnotheis and others added 2 commits August 19, 2026 13:57
Replace __dirname usage in the Eudiplo testcontainer helper with an import.meta.url based path.
@tnotheis
tnotheis enabled auto-merge (squash) August 19, 2026 13:11
@tnotheis
tnotheis requested a review from britsta August 19, 2026 13:12
@tnotheis
tnotheis merged commit 054d8b5 into main Aug 19, 2026
15 checks passed
@tnotheis
tnotheis deleted the make-jest-esm-compatible branch August 19, 2026 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test This pull request contains only new or changed tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants