Skip to content
This repository was archived by the owner on Jul 11, 2026. It is now read-only.

test: cover loading an ESM loader via require() on Node.js 22.12+ - #89

Merged
alexander-akait merged 4 commits into
mainfrom
claude/test-require-esm-loader-GFjXl
May 15, 2026
Merged

test: cover loading an ESM loader via require() on Node.js 22.12+#89
alexander-akait merged 4 commits into
mainfrom
claude/test-require-esm-loader-GFjXl

Conversation

@alexander-akait

Copy link
Copy Markdown
Member

Node.js enables require(esm) by default since 22.12.0, so a .mjs
loader can now be consumed without the explicit type: "module" hint.

claude added 4 commits May 14, 2026 18:03
Node.js enables `require(esm)` by default since 22.12.0, so a `.mjs`
loader can now be consumed without the explicit `type: "module"` hint.
Adds fixtures for an ESM loader with a named `pitch` export, an ESM
loader exposing `raw = true` alongside `default`, and an ESM loader
whose default export is not a function. Tests exercise the
`module.pitch` / `module.raw` reads on a real namespace and the
`import()` rejection branch in `loadLoader`.
@linux-foundation-easycla

Copy link
Copy Markdown

CLA Not Signed

@codecov

codecovBot commented May 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.31%. Comparing base (a1a3888) to head (2a83e63).

Additional details and impacted files
@@ Coverage Diff @@## main #89 +/- ##
=======================================
Coverage 94.31% 94.31% =======================================
Files 3 3 Lines 264 264 =======================================
Hits 249 249 Misses 15 15 
FlagCoverage Δ
integration94.31% <ø> (ø)

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

☔ View full report in Codecov by Sentry.
📢 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.

@alexander-akait
alexander-akait merged commit 857a7bf into mainMay 15, 2026
31 of 32 checks passed
@alexander-akait
alexander-akait deleted the claude/test-require-esm-loader-GFjXl branch May 15, 2026 13:00
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@alexander-akait@claude