Typescript-react-starter: ReactTestUtils Warning

Created on 21 May 2017  ·  5Comments  ·  Source: microsoft/TypeScript-React-Starter

When running tests as described in the readme I get the following warning.

ReactTestUtils has been moved to react-dom/test-utils. Update references to remove this warning.

To fix this I added a dependency on react-test-renderer as required for Enzyme with React >= 15.5.

Most helpful comment

Sorry, got trigger happy, the problem is still present.

```
PASS src/components/Hello.test.tsx
● Console

console.error node_modules/fbjs/lib/warning.js:36
  Warning: ReactTestUtils has been moved to react-dom/test-utils. Update references to remove this warning.
console.error node_modules/fbjs/lib/warning.js:36
  Warning: Shallow renderer has been moved to react-test-renderer/shallow. Update references to remove this warning.

````

All 5 comments

Hey @wmonk, would it make more sense to add this to the https://github.com/wmonk/create-react-app-typescript repo?

We just upgraded to [email protected] so might have been fixed in there. Nobody else has opened this issue there, but if it persists feel free to!

@samblake can you try again and see if the issue is still present?

I tried again, seems to be fine now.

Sorry, got trigger happy, the problem is still present.

```
PASS src/components/Hello.test.tsx
● Console

console.error node_modules/fbjs/lib/warning.js:36
  Warning: ReactTestUtils has been moved to react-dom/test-utils. Update references to remove this warning.
console.error node_modules/fbjs/lib/warning.js:36
  Warning: Shallow renderer has been moved to react-test-renderer/shallow. Update references to remove this warning.

````

Was this page helpful?
0 / 5 - 0 ratings