Too Long; Didn't Read
Pure functions are the perfect case for unit testing. For a given input, we always expect the same output—there is no internal state involved. Let’s take a look at a few examples and some simple tests that check if the methods work as expected.
@marcinwosinek
Marcin Wosinek
I'm a JavaScript developer. I'm here to teach you useful skills, so you can succeed in your work & private projects.
Receive Stories from @marcinwosinek
RELATED STORIES
L O A D I N G
. . . comments & more!