Consider reducing the amount of indirection in the current (integration) tests
...talking mainly about the use of describeReducer
and describeActions
, which create two problems:
- The tests are hard to read. The base assertions should usually be visible at the highest level of the test definition, so that they can be easily linked to the test labels and logic. Some test labels are not descriptive enough (e.g. “returns the expected state”) because they have to be general.
- Much of the same functionality is tested repeatedly. Common functionality should be extracted out and tested only once.