https://github.com/Pokute/esm-jest-warning-crash
esm+jest tests crash with console.warn()
Run npm run test to see output without errors.
Run npm run test-esm to see output with TypeError: stream.removeListener is not a function. error.
The bug reproduction requires at least two .test.js files.
@Pokute while the above should work in theory, just wanted to let you know that all it would be doing is to load the jest library itself with support of es modules. meaning the jest framework could be written, and loaded, with es6 modules.
regarding test code itself, esm and jest don't support each other just yet, though work is on the way ...
Thanks @Pokute!
I'll dig in.
Minor note: Using npx you can make the test invocation:
"test-esm": "npx -n='-r esm' jest"
Update:
v3.0.63 is released :tada:
@jdalton may "setupFiles": "esm" in jest config be useful to avoid firing jest through npx to use esm?