Browse Source

better redux test

Daniel Zlotin 6 years ago
parent
commit
3053550a96
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      integration/redux/Redux.test.js

+ 2
- 2
integration/redux/Redux.test.js View File

41
         );
41
         );
42
       }
42
       }
43
     };
43
     };
44
-    Navigation.registerComponent('ComponentName', () => HOC);
44
+    const CompFromNavigation = Navigation.registerComponent('ComponentName', () => HOC);
45
 
45
 
46
-    const tree = renderer.create(<HOC renderCountIncrement={renderCountIncrement}/>);
46
+    const tree = renderer.create(<CompFromNavigation componentId='componentId' renderCountIncrement={renderCountIncrement}/>);
47
     expect(tree.toJSON().children).toEqual(['no name']);
47
     expect(tree.toJSON().children).toEqual(['no name']);
48
     expect(renderCountIncrement).toHaveBeenCalledTimes(1);
48
     expect(renderCountIncrement).toHaveBeenCalledTimes(1);
49
   });
49
   });