https://github.com/toilal/jest-esm-process-mutate-repro
Reproduction for https://github.com/facebook/jest/issues/12650
https://github.com/toilal/jest-esm-process-mutate-repro
Last synced: 12 days ago
JSON representation
Reproduction for https://github.com/facebook/jest/issues/12650
- Host: GitHub
- URL: https://github.com/toilal/jest-esm-process-mutate-repro
- Owner: Toilal
- Created: 2022-04-08T08:41:11.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-04-08T10:01:58.000Z (over 4 years ago)
- Last Synced: 2025-10-04T14:00:39.070Z (10 months ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jest-esm-process-mutate-repro
Reproduction repository for [facebook/jest#12650](https://github.com/facebook/jest/issues/12650).
When running jest as ESM (with node `--experimental-vm-modules` flag) and importing (in this order) `node:process` and a
custom CJS module that adds properties to `node:process` module, jest-runtime crash with the following error
```
ReferenceError: Export 'xxx' is not defined in module` error.
```
### Reproduce
```shell
npm install
npm run test # test-import-process-before.cjs.spec.js cause the crash
```