Closed Delagen closed 1 month ago
Hi, we have example apps at https://github.com/thymikee/jest-preset-angular/tree/main/examples which already had 29.2.x Would you please put your reproduce scenario there? Thanks!
@ahnpnl
npm i
failed with peer dependencies error
Updated to
"typescript": "~5.5.3"
"angular-in-memory-web-api": "^0.18.0",
then tried install again
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
npm warn deprecated glob@7.2.3: Glob versions prior to v9 are no longer supported
npm warn deprecated abab@2.0.6: Use your platform's native atob() and btoa() methods instead
npm warn deprecated domexception@4.0.0: Use your platform's native DOMException instead
added 1235 packages, and audited 1236 packages in 2m
150 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
Tried to run npm run test-esm
and get error
> example-app-v18@18.0.0 test-esm
> node --experimental-vm-modules --no-warnings ./node_modules/jest/bin/jest.js -c=jest-esm.config.mjs --no-cache
SyntaxError: Unexpected identifier 'assert'
at compileSourceTextModule (node:internal/modules/esm/utils:337:16)
at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:164:18)
at callTranslator (node:internal/modules/esm/loader:439:14)
at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:445:30)
at async ModuleJob._link (node:internal/modules/esm/module_job:106:19)
Hmm CI passes though using yarn. could you pls try yarn instead? Not sure what’s going on with npm though.
@ahnpnl Seems I find the case of my issue.
Need to set "moduleResolution": "NodeNext" in tsconfig.spec.json, because strange but it stops to work with value Bundler
Version
14.1.1
Steps to reproduce
Install ts-jest 29.2.x Tune tests in ESM mode
jest.setup.ts
Expected behavior
All works as expected
Actual behavior
Additional context
No response
Environment