See all tags.
Tagged “Jest”
We've all encountered at some point code that needs to do some API calls or read from the file system. It's a super bad idea to actually let the code make the real http requests or read from the file system during unit test. Let's see why and how we can get around these kind of issues.
This articles continues the unit testing for beginners series by diving into some of the more advanced concepts when testing functions. You will learn what mocking and stubbing is, how to test functions involving timers and network calls
Testing should be simple. But if you're just starting out it can be a bit overwhelming deciding which test framework you should use, how to set it up, what are the techniques of testing the various components you will be developing.
Most people who use snapshot testing believe it is somehow incompatible with Enzyme. This post will show you that it's not Snapshots vs Enzyme but Snapshots & Enzyme
Sometimes tests fail. And sometimes you don't have any clue as to why they do... Follow along to see how you can setup VSCode debugging together with Jest to get breakpoints, step through and all the other goodies you would expect when debugging a piece of code.