error jest: Warning: React.createElement: type is invalid

Viewed 378

I'm testing a React Native app build with Typescript.

Jest Output:

Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object

Ps. Rn work anyway also render method, but i don't understand where is this bug in the code. Anyone can help me?

App.test.tsx

import 'react-native';
import * as React from 'react';
import App from '../App';

import renderer from 'react-test-renderer';

it('renders correctly', () => {
  renderer.create(<App />);
});

1 Answers
Related