Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update TutorialReactNative.md #5567

Merged
merged 1 commit into from
Feb 15, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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