Simplifying Basic Reducer Test
Simplify the test that we wrote in the previous lesson.
We'll cover the following...
Using the method of writing tests described in the previous lesson, we will need to find each test definition’s initial state and add more properties. This complicates the test writer’s job without providing any benefits. Luckily, the reducer already creates non-empty states. Since we already tested adding to an empty list in the first test, we can rely on our reducer to create a non-empty list with all the required recipe information. You pass an empty array into the reducer and it fills it with the relevant state:
// Building initial state using
...