showing results for - "react natice mock redux"
Esteban
09 Jan 2020
1check the Defautl documetation test you will find better idea to test your store
2
3
4test('should handle a todo being added to an empty list', () => {
5  const previousState = []
6  expect(reducer(previousState, todoAdded('Run the tests'))).toEqual([
7    {
8      text: 'Run the tests',
9      completed: false,
10      id: 0
11    }
12  ])
13})
14
15todoAdded is any of your change on which state it do impack just replace
16the object  toEqual([
17    {
18      text: 'Run the tests',  //todoAdded impact here and chnage the state
19      completed: false,
20      id: 0
21    }
22  ]) 
23