-
Notifications
You must be signed in to change notification settings - Fork 36
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
toMatchSnapshot fails to work #14
Comments
I think the key to fixing this is to replace |
@ronlawrence3 replacing jasmine with jest seems to work. However in VSCode TS still complains. Eg. |
It looks like with a fresh project from the latest cli, and the latest schematic from this project, things seem to work for me now. But as @rgunczer says, VScode still doesn't like it. if I add jest to the main tsconfig.json, it is ok with it, so vscode must be using that tsconfig. |
A quick fix :
you can create an helper |
Add support single application projects and workspaces with apps and libraries. ## Jest runner Replace the direct reliance on [`jest-preset-angular`](https://github.com/thymikee/jest-preset-angular) and package json scripts in favor of [`angular-builders/jest`](https://github.com/just-jeb/angular-builders/tree/master/packages/jest). This provides the ability to run tests with `ng test` This should address #30 #28 #22 #11 It better positions us to support #1 ## Jest types Update each projects `tsconfig.spec.json` to configure the `jest` types while removing `jasmine` This should address #24 #14 ## Other Non-user facing changes - refactor development scripts from `package.json` to TS file - create 2 sandboxes (single app and workspace with app and lib) - test both sandboxes during CI - add MIT license - add prettier
Please see if |
This should be fixed with the latest 3.0.0 release. Please reopen if not. |
Describe the bug
Adding a toMatchSnapshot() assertion in a test on a fresh angular 6 project gets an error.
To Reproduce
Steps to reproduce the behavior:
With @angular/cli@6:
Error message is:
Expected behavior
I expected these to work once project is converted to jest
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: