Next, Logging, and Conclusions
Welcome to Part 6, the final installment in this series. Below we cover unit testing the noop
next, how to create pure functions that wrap
noop so you can compose them, and finally using code coverage to strategically hit the last code that’s not covered.
Continue reading “Functional Programming Unit Testing in Node – Part 6”
Noops, Stub Soup, and Mountebank
Welcome to Part 5 where we cover more about noops with a utility to test them, the “stub soup” that can happen if you don’t create small pure functions, and how we can utilize stubs instead of mocks to unit test larger functions. The most important part, though, is setting up Mountebank to show how integration tests can show problems in your unit tests despite 100% coverage. We use wrapping
class instances as an example to show you the pitfalls Object Oriented Programming code can make for you.
Continue reading “Functional Programming Unit Testing in Node – Part 5”
Concurrency, Compose, and Coverage
Welcome to Part 4 where we show how to do concurrency which is a lot easier to get “for free” using pure functions, we compose both async and synchronous functions, we and utilize a test coverage report to where next to focus our refactoring and testing efforts.
Continue reading “Functional Programming Unit Testing in Node – Part 4”
OOP, Compose, and Curry
Welcome to Part 3 where we’ll show you how to navigate
class based code using FP, go over composing all these asynchronous functions we wrote, and continuing to define our dependencies in curried functions to make them easier to test.
Continue reading “Functional Programming Unit Testing in Node – Part 3”