Showing posts with label jest. Show all posts
Showing posts with label jest. Show all posts

Tuesday, October 17, 2017

Jest test fails after upgrading to React 16



Made it work by changing the shallow to mount:




Have to learn the difference of mount vs shallow.


Happy Coding!

Monday, October 16, 2017

ts-jest Cannot find name 'test'




There are two ways to fix that. One, import 'jest' directly:




Another way is to put the jest type in tsconfig.json:



Happy Coding!