We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Child of #1075
Snapshot based unit testing for UI
The text was updated successfully, but these errors were encountered:
Referred following doc to integrate Jest with angular : https://medium.com/@nerdic.coder/how-to-use-jest-unit-tests-with-angular-87509b500158
Apart from this, was getting TS:2339 : property 'toMatchSnapshot' does not exist on type Matchers<ComponentFixture>
Resolved this by adding globals diagnosis configuration (also added options which were default for jest-preset-angular)
"jest": { "preset": "jest-preset-angular", "setupFilesAfterEnv": [ "/src/setupJest.ts" ], "globals": { "ts-jest": { "tsConfig": "/src/tsconfig.spec.json", // default for jest-preset-angular "stringifyContentPathRegex": "\.html$", // default for jest-preset-angular "astTransformers": ["node_modules/jest-preset-angular/InlineHtmlStripStylesTransformer"], // default for jest-preset-angular "diagnostics": { "ignoreCodes": ["6059", "18002", "18003", "TS2339"] //apart from TS2339 all were default for jest-preset-angular } } } },
Sorry, something went wrong.
akshaymhetre
No branches or pull requests
Child of #1075
Snapshot based unit testing for UI
The text was updated successfully, but these errors were encountered: