Skip to content

Commit

Permalink
Update TutorialReactNative.md (#5567)
Browse files Browse the repository at this point in the history
Removes redundant `import react-native`
  • Loading branch information
Billy- authored and cpojer committed Feb 15, 2018
1 parent 146900f commit b9b1f0d
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions docs/TutorialReactNative.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ the component and capture the rendered output and create a snapshot file:

```javascript
// __tests__/Intro-test.js
import 'react-native';
import React from 'react';
import Intro from '../Intro';

// Note: test renderer must be required after react-native.
import renderer from 'react-test-renderer';

test('renders correctly', () => {
Expand Down Expand Up @@ -250,17 +248,6 @@ real device and then modeling a manual mock after the real module.
If you end up mocking the same modules over and over it is recommended to define
these mocks in a separate file and add it to the list of `setupFiles`.

### require react-native before the test renderer

Currently it is required to require react-native before loading the test
renderer:

```js
import 'react-native';
// Require after react-native
import renderer from 'react-test-renderer';
```

### `@providesModule`

If you'd like to use Facebook's `@providesModule` module system through an npm
Expand Down

0 comments on commit b9b1f0d

Please sign in to comment.