react-navigation/jest-setup.js
Satyajit Sahoo a7b1243053 Fix flow (#305)
* Fix Flow and Android build

* Enable flow on CI

* Fix and suppress flow errors
2017-02-13 08:26:30 -08:00

20 lines
563 B
JavaScript

/* eslint-env jest */
// See https://github.com/facebook/jest/issues/2208
jest.mock('Linking', () => ({
addEventListener: jest.fn(),
removeEventListener: jest.fn(),
openURL: jest.fn(),
canOpenURL: jest.fn(),
getInitialURL: jest.fn().mockImplementation((value: string) => Promise.resolve(value)),
}));
// See https://github.com/facebook/react-native/issues/11659
jest.mock('ScrollView', () => {
const RealComponent = require.requireActual('ScrollView');
class ScrollView extends RealComponent {
scrollTo = () => {}
}
return ScrollView;
});