Last active
July 3, 2018 08:14
-
-
Save michelepatrassi/939f7179a39d772517cfb106a13ed14d to your computer and use it in GitHub Desktop.
Setup: Angular unit testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Jest configuration: | |
- use jest with angular with jest preset angular (follow readme): https://www.npmjs.com/package/jest-preset-angular | |
- remove Jasmine types, because it duplicates the declaration from @types/jest: npm uninstall @types/jasmine | |
Visual studio extensions: | |
- jest | |
- snapshot-tools | |
Other useful libraries (from youtube video): | |
- jasmine marbles to test observables: https://www.npmjs.com/package/jasmine-marbles | |
- angular testing library: https://www.npmjs.com/package/angular-testing-library | |
References: | |
- https://www.xfive.co/blog/testing-angular-faster-jest/ | |
- https://www.youtube.com/watch?time_continue=397&v=MTZprd9tI6c |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment