Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Warning: ReactTestUtils has been moved to react-dom/test-utils #152

Open
ahmedlhanafy opened this issue Nov 25, 2017 · 1 comment
Open

Comments

@ahmedlhanafy
Copy link

This library still depends on react-addons-test-utils which has been moved to react-dom, this is causing warnings when testing with Jest.

@Mr-GC
Copy link

Mr-GC commented Feb 5, 2018

Updating the path in \node_modules\react-addons-test-utils\index.js solved this for me.

Old:

lowPriorityWarning(
  false,
  'ReactTestUtils has been moved to react-dom/test-utils. ' +
    'Update references to remove this warning.'
);

module.exports = require('react-dom/lib/ReactTestUtils');

New:

lowPriorityWarning(
  false,
  'ReactTestUtils has been moved to react-dom/test-utils. ' +
    'Update references to remove this warning.'
);

module.exports = require('react-dom/test-utils');

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants