FP testing approach
Most of the case that's enough!
- Clean/Reinitiate properly between each test
- Coupling with other Module
- Mock some third-party dependencies
- Write multiple tests against the same function
- idempotence trouble
Only test our business logic data flow concern Observable context
RP approach marble-testing library
- Add additional endpoint
- Use middleware
- Pass user information through context
ASCII Art to define Observable and test it