briebug / jest-schematic

Angular schematic for adding Jest and the required files to an Angular CLI project
MIT License
322 stars 38 forks source link

Jest throws an error "TypeError: tslib_1.__classPrivateFieldSet is not a function" when i try to do npm test after migrating from Karma to Jest using schematic #114

Closed Yujwala closed 1 year ago

Yujwala commented 2 years ago

TypeError: tslib_1.__classPrivateFieldSet is not a function at new NgJestTransformer (/Users/aplklat492496/Documents/OHL/oha/oha-web-frontend/node_modules/jest-preset-angular/build/ng-jest-transformer.js:18:17) at Object.createTransformer (/Users/aplklat492496/Documents/OHL/oha/oha-web-frontend/node_modules/jest-preset-angular/build/index.js:5:30) at /Users/aplklat492496/Documents/OHL/oha/oha-web-frontend/node_modules/@jest/transform/build/ScriptTransformer.js:392:39 at async Promise.all (index 0) at async ScriptTransformer.loadTransformers (/Users/aplklat492496/Documents/OHL/oha/oha-web-frontend/node_modules/@jest/transform/build/ScriptTransformer.js:376:5) at async createScriptTransformer (/Users/aplklat492496/Documents/OHL/oha/oha-web-frontend/node_modules/@jest/transform/build/ScriptTransformer.js:1114:3) at async /Users/aplklat492496/Documents/OHL/oha/oha-web-frontend/node_modules/@jest/core/build/TestScheduler.js:264:31 at async Promise.all (index 0) at async TestScheduler.scheduleTests (/Users/aplklat492496/Documents/OHL/oha/oha-web-frontend/node_modules/@jest/core/build/TestScheduler.js:259:5) at async runJest (/Users/aplklat492496/Documents/OHL/oha/oha-web-frontend/node_modules/@jest/core/build/runJest.js:407:19)

pmirandaarias commented 2 years ago

@Yujwala Did you solve it? I'm getting the same error, and also I'm trying to migrate from Karma to Jest

schuchard commented 2 years ago

Can you test with latest v5.0.0 and let me know if that helps?