Mocking Dependencies in Unit Tests Using Default Parameters
Channel: Jesse Warden
Date: 2017-09-28

We use JavaScript's default parameters to make a more flexible function partial. Instead of 2 functions, 1 being the partial, instead we use a default parameter in JavaScript using 1 function. Testable, yet usable as-is by the developer.