I had the same problem with 0.42. I hit my head until I found a piecemeal solution.
You need to write ignore in package.json . Mine example:
"jest": { "preset": "react-native", "setupFiles": [ "<rootDir>/src/config/jest.js" ], "transformIgnorePatterns": [ "<rootDir>/(node_modules)/(?!react-native|react-navigation|bugsnag-react-native)" ], "transform": { "^.+\\.js$": "<rootDir>/node_modules/babel-jest" }
And my /config/jest.js looks like this:
jest.mock('Linking', () => ({ addEventListener: jest.fn(), removeEventListener: jest.fn(), openURL: jest.fn(), canOpenURL: jest.fn(), getInitialURL: jest.fn().mockImplementation(() => new Promise((resolve) => resolve())) })); jest.mock('mobx-react/native', () => require('mobx-react/custom')); jest.mock('react-native-mixpanel', () => ({ sharedInstanceWithToken: jest.fn(), trackWithProperties: jest.fn() })); jest.mock('bugsnag-react-native', () => ({ Client: jest.fn(), Configuration: jest.fn() }));
I cannot guarantee that this solves all your problems directly. However, the idea is to ignore all the "villains" ( response-native-root-siblings in your case), thereby avoiding such error messages.
zvona source share