RealOrangeOne / react-native-mock

A fully mocked and test-friendly version of react native (maintainers wanted)
MIT License
570 stars 153 forks source link

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

Open ahmedlhanafy opened 6 years ago

ahmedlhanafy commented 6 years ago

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 commented 6 years ago

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');