Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix preset import path for jest-preset-angular in setup-jest.ts #82

Closed
inorganik opened this issue Dec 13, 2021 · 0 comments · Fixed by #83
Closed

Fix preset import path for jest-preset-angular in setup-jest.ts #82

inorganik opened this issue Dec 13, 2021 · 0 comments · Fixed by #83

Comments

@inorganik
Copy link

Several versions back, jest-preset-angular changed the location of the preset used in setup-jest.ts

Before
import 'jest-preset-angular';

Current
import 'jest-preset-angular/setup-jest';

The schematic needs to the import path updated to the current location, otherwise you get errors like the following because zone isn't included:

"Zone is needed for the waitForAsync() test helper but could not be found..."

To Reproduce

  1. Run the schematic on a project.

Expected behavior
Should import from the proper location.

Desktop (please complete the following information):

  • OS: Mac and Win
  • Node version: 14
  • NPM or Yarn version: 6.14.8
  • App type: Angular CLI
  • Angular version: seen on 10.2 and 12.1
    Additional context
    Add any other context about the problem here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant