Testing Pure Functions

Learn how to test pure functions.

We'll cover the following...

Pure functions

A function is pure if every single time you call the function with the same parameters, it returns the same answer, and if it has no side effects. If a dependency can change the result, the function is not pure.

When testing a pure function, the test ...