mirror of
https://github.com/status-im/react-native.git
synced 2025-01-16 20:44:10 +00:00
8689b0f21c
Summary: Adding jest and its presets to the react-native init command **Test plan (required)** run react-native init foo (using `npm link` to use the local `react-native` version) inside foo there are now a .babelrc file and the package.json is set up as described by https://facebook.github.io/jest/docs/tutorial-react-native.html#setup Closes https://github.com/facebook/react-native/pull/9719 Differential Revision: D3843037 Pulled By: bestander fbshipit-source-id: 004e27ebd3f257a202ed43f378d6fe6cc23ced52
13 lines
284 B
JavaScript
13 lines
284 B
JavaScript
import 'react-native';
|
|
import React from 'react';
|
|
import Index from '../index.android.js';
|
|
|
|
// Note: test renderer must be required after react-native.
|
|
import renderer from 'react-test-renderer';
|
|
|
|
it('renders correctly', () => {
|
|
const tree = renderer.create(
|
|
<Index />
|
|
);
|
|
});
|