You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using an angular nx workspace with jest projects. I need to use esm because i've some web worker usages.
See error below. My workaround is to set allowJs=true to my tsconfig.spec.json so tslib will be compiled by this project.
To Reproduce
Steps to reproduce the behavior:
Create a nx workspoace with angular preset and some dummy libs.
Configure for esm and run tests.
Expected behavior
Simply run tests without explicit workaround.
Link to repo (highly encouraged)
I can provide a sample maybe later.
Error log:
# content of error stacktrace :
C:\Users\kriese\projects\visualon\xfab\sx\node_modules\tslib\tslib.es6.js:24
export function __extends(d, b) {
^^^^^^
SyntaxError: Unexpected token 'export'
at Runtime.createScriptFromCode (../../node_modules/jest-runtime/build/index.js:1479:14)
We have 2 choices here: either always set allowJs: true internally or remove the mapping of tslib. I prefer the 1st choice as mapping tslib is required if running Jest in ESM mode.
🐛 Bug Report
I'm using an angular nx workspace with jest projects. I need to use esm because i've some web worker usages.
See error below. My workaround is to set
allowJs=true
to mytsconfig.spec.json
sotslib
will be compiled by this project.To Reproduce
Steps to reproduce the behavior:
Create a nx workspoace with angular preset and some dummy libs.
Configure for esm and run tests.
Expected behavior
Simply run tests without explicit workaround.
Link to repo (highly encouraged)
I can provide a sample maybe later.
Error log:
envinfo
The text was updated successfully, but these errors were encountered: