瀏覽代碼

better redux test

Daniel Zlotin 6 年之前
父節點
當前提交
3053550a96
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      integration/redux/Redux.test.js

+ 2
- 2
integration/redux/Redux.test.js 查看文件

@@ -41,9 +41,9 @@ describe('redux support', () => {
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 47
     expect(tree.toJSON().children).toEqual(['no name']);
48 48
     expect(renderCountIncrement).toHaveBeenCalledTimes(1);
49 49
   });