Great work! We have covered a lot over this lesson. Let’s take a moment to review:
- We also learned some of the basic syntax involved with creating a simple unit test, such as the
- After tackling basic unit tests we adventured into the realm of testing asynchronous code with Jest by using the
doneparameter to wait for asynchronous callbacks and the
awaitkeywords to wait for Promises to resolve
- Lastly, we learned how to mock functions using
jest.fn()and make use of mocked modules with
jest.mock()by mocking the Axios module.
While we have learned a lot there is always more knowledge to be obtained and we encourage you to continue exploring Jest and its wonderful features!