When building React applications you will most likely find yourself using Jest as your testing framework. Jest has some really, really cool features built in. But when you use Enzyme you can take your testing to the nest level. One really cool feature is the ability to test click events via Enzyme to ensure your …
Category: Jest
Ensuring componentDidMount is not called in Unit Tests
If you are building a ReactJs you will often times implement componentDidMount on your components. This is very handy at runtime, but can pose an issue for unit tests. If you are building tests for your React app you are very likely using enzyme to create instances of your component. The issue is that when enzyme creates …
Continue reading Ensuring componentDidMount is not called in Unit Tests
Using Manual Mocks to test the AWS SDK with Jest
Anytime you build Node applications it is highly suggested that your cover your code with tests. When your code interacts with 3rd party API's such as AWS you will most certainly want to mock/stub your calls in order to prevent external calls (if you actually want to do external calls, these are called integration tests …
Continue reading Using Manual Mocks to test the AWS SDK with Jest