mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
298fd10c96
Summary: Removed FlowFixMe that has been fixed ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Fixed] - Removed FlowFixMe that has been fixed Pull Request resolved: https://github.com/facebook/react-native/pull/29468 Test Plan: flow check passes Reviewed By: JoshuaGross Differential Revision: D29967702 Pulled By: lunaleaps fbshipit-source-id: 541279287ba6f21c5c7290bcba7c282f092126ff
31 lines
804 B
JavaScript
31 lines
804 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
* @emails oncall+react_native
|
|
* @flow
|
|
*/
|
|
|
|
import * as React from 'react';
|
|
import TestRenderer from 'react-test-renderer';
|
|
import ShallowRenderer from 'react-shallow-renderer';
|
|
|
|
const renderer = new ShallowRenderer();
|
|
|
|
export const shallow = (Component: React.Element<any>): any => {
|
|
const Wrapper = (): React.Element<any> => Component;
|
|
|
|
return renderer.render(<Wrapper />);
|
|
};
|
|
|
|
export const shallowRender = (Component: React.Element<any>): any => {
|
|
return renderer.render(Component);
|
|
};
|
|
|
|
export const create = (Component: React.Element<any>): any => {
|
|
return TestRenderer.create(Component);
|
|
};
|