Skip to content

Commit 7b30bb4

Browse files
authored
use react-dom/test-utils instead of 'react-addons-test-utils
1 parent 7a84ed0 commit 7b30bb4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

day-24/post.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ For every test that we write against React, we'll want to import react into our
4545

4646
```javascript
4747
import React from 'react';
48-
import TestUtils from 'react-addons-test-utils';
48+
import TestUtils from "react-dom/test-utils";
4949

5050
describe('Timeline', () => {
5151
// Tests go here
@@ -56,7 +56,7 @@ Since we're testing the `Timeline` component here, we'll also want to bring that
5656

5757
```javascript
5858
import React from 'react';
59-
import TestUtils from 'react-addons-test-utils';
59+
import TestUtils from "react-dom/test-utils";
6060

6161
import Timeline from '../Timeline';
6262

@@ -65,11 +65,11 @@ describe('Timeline', () => {
6565
})
6666
```
6767

68-
Let's write our first test. Our first assumption is pretty simple to test. We're testing to make sure the element is wrapped in a `.notificationsFrame` class. With every test we'll write, we'll need to render our application into the working test document. The `react-addons-test-utils` library provides a function to do just this called `renderIntoDocument()`:
68+
Let's write our first test. Our first assumption is pretty simple to test. We're testing to make sure the element is wrapped in a `.notificationsFrame` class. With every test we'll write, we'll need to render our application into the working test document. The `react-dom/test-utils` library provides a function to do just this called `renderIntoDocument()`:
6969

7070
```javascript
7171
import React from 'react';
72-
import TestUtils from 'react-addons-test-utils';
72+
import TestUtils from "react-dom/test-utils";
7373

7474
import Timeline from '../Timeline';
7575

@@ -90,7 +90,7 @@ The `findRenderedDOMComponentWithClass()` function accepts _two_ arguments. The
9090

9191
```javascript
9292
import React from 'react';
93-
import TestUtils from 'react-addons-test-utils';
93+
import TestUtils from "react-dom/test-utils";
9494

9595
import Timeline from '../Timeline';
9696

0 commit comments

Comments
 (0)