Unit testing in JavaScript Part 1 — Why unit testing?

Mattias Petter Johansson
Fun Fun Function
Published in
1 min readNov 6, 2017

Today, we are going to start exploring unit testing in JavaScript.

I think of Unit testing as a software development technique where you break your software up into small, isolated units and write automated tests that ensure that each unit works as expected.

My main motivation for doing unit testing is to keep complexity from overwhelming me. And that is what we’re going to explore in this first video — we’re going to look at how a new piece of code always starts out simple but very quickly gets too much to keep all in our heads.

Full video below:

🔗 Support the show by becoming a Patreon
https://www.patreon.com/funfunfunction

🔗 Discuss this video on the Fun Fun Forum
https://www.funfunforum.com/t/unit-testing-in-javascript/3071/1

🔗 Inline evaluation plugin
https://quokkajs.com/

🔗 Code snippets from the episode
https://gist.github.com/mpj/c53f72984830b86fd92f4778a594efbf

🔗 Reduce video
https://www.youtube.com/watch?v=Wl98eZpkp-c&index=3&list=PL0zVEGEvSaeEd9hlmCXrk5yUyqUag-n84

🔗 mpj on Twitter
https://twitter.com/mpjme

🔗 Help translate the show to your language
http://www.youtube.com/timedtext_cs_panel?tab=2&c=UCO1cgjhGzsSYb1rsB4bFe4Q

--

--

Mattias Petter Johansson
Fun Fun Function

Creator of Fun Fun Function, a YouTube show about programming.