Too Long; Didn't Read
Unit tests are small pieces of code that verify units of your code against explicit expectations. You write your code to give yourself a way of checking your code automatically. In real-world JavaScript projects, people usually use open-source frameworks for testing. In this article, for simplicity, I’ll use pseudocode inspired by those frameworks. Pure functions are functions whose results depend only on the arguments that were provided. They don't keep internal state, and they don't read external values besides arguments. They are the same as functions in the mathematical sense.