You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to test my root component which uses react-native-safarview and I receive the following error:
Invariant Violation: Native module cannot be null.
at invariant (node_modules/fbjs/lib/invariant.js:25:15)
at new NativeEventEmitter (node_modules/react-native/Libraries/EventEmitter/NativeEventEmitter.js:29:7)
at Object.<anonymous> (node_modules/react-native-safari-view/SafariViewManager.ios.js:11:20)
at Object.<anonymous> (node_modules/react-native-safari-view/index.js:7:26)
App.test.tsx
import React from "react";
import Enzyme, { shallow } from "enzyme";
import Adapter from "enzyme-adapter-react-16";
import App from "../App";
Enzyme.configure({ adapter: new Adapter() });
it("renders correctly", () => {
const wrapper = shallow(<App />);
expect(wrapper).toMatchSnapshot();
});
I created a folder /jest/setup.js and updated my jest.config.js as it's suggested here.
Hi,
I'm trying to test my root component which uses
react-native-safarview
and I receive the following error:App.test.tsx
I created a folder /jest/setup.js and updated my jest.config.js as it's suggested here.
but it didn't work. How can I fix it?
jest.config.js
The text was updated successfully, but these errors were encountered: