Closed thogrego closed 1 year ago
I have this exact same issue, using angular 14.2.1
Have you been able to work around this?
To get it working, I did the following:
npm install -D jest jest-preset-angular
in setup-jest.ts
:
change import 'jest-preset-angular/setup-jest';
to import 'jest-preset-angular';
I still see some issues in test-config.helper.ts
. Since Angular 14.2 TestBed.configureCompiler
returns a void instead of TestBedStatic
.
When I delete test-config.helper.ts
, everything still seems to run fine. Is this file still needed for something?
I also have this same issue with the test-config.helper.ts
file. How can this be fixed? Just deleting the file seems a little risky for me. @schuchard What is the current status of this and how can this be fixed?
Can you test with latest v5.0.0 and let me know if that helps? test-config.helper.ts
has been removed.
Describe the bug After running the command "ng add @briebug/jest-schematic" inside of my angular app and then running "ng test", I receive an error:
Validation Error:
Preset jest-preset-angular not found.
Configuration Documentation: https://jestjs.io/docs/configuration
To Reproduce
Expected behavior I expected the 3 default unit tests in my app.component.spec.ts to pass successfully.
Screenshots
Desktop (please complete the following information):
Additional context