Uploaded December 2017 | Updated September 2026, 3 weeks ago
π Support the show by becoming a Patreon
patreon.com/funfunfunction
π Wallaby (Show sponsor)
Wallaby.js runs your JavaScript tests immediately as you type and displays execution results in your code editor. It is insanely fast, because it only executes tests affected by your code changes and runs tests in parallel. Let them know you came from us by using this link:
wallaby.funfunfunction.com
π Watch this series from the start
youtube.com/watch?v=Eu35xM76kKY&index=1&list=PL0zVEGEvSaeF_zoW9o66wa_UCNE3a7BEr
π Discuss this video on the Fun Fun Forum
funfunforum.com/t/unit-testing-in-javascript-part-6-red-green-refactor-and-jest-mocks/3480
π Code from the episode
github.com/mpj/unit-testing-series/tree/58fd83c3c5be4243c9d0f19a840aae9a6ef4ef86
π That cool inline evaluation plugin
quokkajs.com
π mpj on Twitter
twitter.com/mpjme
π The gear I use to produce the videos
youtu.be/gTk8nPj11Yk
π Help translate the show to your language
youtube.com/timedtext_cs_panel?tab=2&c=UCO1cgjhGzsSYb1rsB4bFe4Q
Today, we are continuing our journey on unit testing in JavaScript. In this episode we do some refactoring, and change our tests to use Jest mock helpers instead of our custom mocks written in vanilla JavaScript.
π Support the show by becoming a Patreon
patreon.com/funfunfunction
π Wallaby (Show sponsor)
Wallaby.js runs your JavaScript tests immediately as you type and displays execution results in your code editor. It is insanely fast, because it only executes tests affected by your code changes and runs tests in parallel. Let them know you came from us by using this link:
wallaby.funfunfunction.com
π Watch this series from the start
youtube.com/watch?v=Eu35xM76kKY&index=1&list=PL0zVEGEvSaeF_zoW9o66wa_UCNE3a7BEr
π Discuss this video on the Fun Fun Forum
funfunforum.com/t/unit-testing-in-javascript-part-6-red-green-refactor-and-jest-mocks/3480
π Code from the episode
github.com/mpj/unit-testing-series/tree/58fd83c3c5be4243c9d0f19a840aae9a6ef4ef86
π That cool inline evaluation plugin
quokkajs.com
π mpj on Twitter
twitter.com/mpjme
π The gear I use to produce the videos
youtu.be/gTk8nPj11Yk
π Help translate the show to your language
youtube.com/timedtext_cs_panel?tab=2&c=UCO1cgjhGzsSYb1rsB4bFe4Q
Today, we are continuing our journey on unit testing in JavaScript. In this episode we do some refactoring, and change our tests to use Jest mock helpers instead of our custom mocks written in vanilla JavaScript.


