瀏覽代碼

Fix tests, probably rebase issue

Guy Carmeli 6 年之前
父節點
當前提交
ea4af6444c
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2
    1
      lib/src/components/ComponentRegistry.test.tsx

+ 2
- 1
lib/src/components/ComponentRegistry.test.tsx 查看文件

@@ -4,6 +4,7 @@ import { mock, instance, verify, anyFunction } from 'ts-mockito';
4 4
 import { ComponentWrapper } from './ComponentWrapper';
5 5
 import { ComponentEventsObserver } from '../events/ComponentEventsObserver';
6 6
 import { AppRegistryService } from '../adapters/AppRegistryService';
7
+import { ComponentProvider } from 'react-native';
7 8
 
8 9
 const DummyComponent = () => null;
9 10
 
@@ -43,7 +44,7 @@ describe('ComponentRegistry', () => {
43 44
   });
44 45
 
45 46
   it('should not invoke generator', () => {
46
-    const generator = jest.fn(() => {});
47
+    const generator: ComponentProvider = jest.fn(() => DummyComponent);
47 48
     uut.registerComponent('example.MyComponent.name', generator);
48 49
     expect(generator).toHaveBeenCalledTimes(0);
49 50
   });