|
@@ -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
|
});
|