Aug 28, 2017 · 1 min read
“It’s impossible to set up / tear down with pure functions.”
Only if you’re setting up or tearing down things like database or network connections for end-to-end testing purposes — but that should only happen in end-to-end tests, and those should account for a small fraction of your total tests.
Most of your tests should be unit tests of pure functions. If that seems hard, chances are very good that your app is too tightly coupled.
