JavaScript Testing - Mocking Async Code

External video

Load YouTube video?

This video is provided by YouTube. Loading it will connect your browser to YouTube and Google servers, where their own terms and privacy policies apply.

Open on YouTube

Testing: Mocking Async Code

Testing async JavaScript code or testing JS dependencies in general can be difficult. But "mocking" is a technique that can easily be implemented with Jest to make JavaScript testing a breeze again.