jest icon indicating copy to clipboard operation
jest copied to clipboard

[Bug]: allow require(esm)

Open dynst opened this issue 7 months ago • 1 comments

Version

29.7.0

Steps to reproduce

Have a Jest unit test use require() on a dependency with an "exports" field giving ESM

Expected behavior

When running Node.js 20.19, require(esm) should work.

https://nodejs.org/en/blog/release/v20.19.0

Actual behavior

https://github.com/jestjs/jest/blob/ac334c0cdf04ead9999f0964567d81672d116d42/packages/jest-runtime/src/index.ts#L960-L969

Additional context

It'd be great to get a patch release of 29.7.1 that uses the more relaxed behavior of node 20.x. Node.js 18 has been EOL since April 30.

Environment

All of them

dynst avatar Jun 04 '25 17:06 dynst

See https://github.com/jestjs/jest/issues/15275

gabegorelick avatar Jun 15 '25 02:06 gabegorelick

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

github-actions[bot] avatar Jul 15 '25 02:07 github-actions[bot]

Duplicate of #15275

dynst avatar Jul 15 '25 04:07 dynst

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

github-actions[bot] avatar Aug 15 '25 00:08 github-actions[bot]