Chapter 10. Testing reactive code
In this chapter
- Testing fundamentals
- Writing tests for reactive applications
- Using tools to deal with asynchronous code
- Knowing which code to test and which not to test
Like it or not, testing at least critical parts of your application is usually a good idea. Reactive applications can seem tricky to test, but the modularization they promote shows the opposite, if you write your code according to these guidelines we’ve been discussing:
- Make modules that have as few dependencies as possible.
- Prefer pure functions that can be composed for more complex functionality.
In general, we tend to divide tests into unit testing and acceptance testing. These two test types are focused on different parts of the application and have different goals, as shown in the following lists.
Unit testing |
Acceptance testing |
---|---|
|
|