I am getting following error when trying to use TestUtils
Error log:
ERROR in ./test/components/SignUpTest.js
Module not found: Error: Cannot resolve module 'react/addons' in /path/test/components
@ ./test/components/SignUpTest.js 6:14-37
13 08 2016 12:14:21.845:WARN [karma]: Port 8080 in use
13 08 2016 12:14:21.849:INFO [karma]: Karma v0.13.22 server started at http://localhost:8081/
13 08 2016 12:14:21.862:INFO [launcher]: Starting browser PhantomJS
13 08 2016 12:14:22.619:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Connected on socket /#E8nUUEWv4m4TQ4Q4AAAA with id 88656685
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
Error: Cannot find module "react/addons"
at undefined:6
My code:
import React from 'react/addons';
const TestUtils = React.addons.TestUtils;
Hi,
I am getting following error when trying to use TestUtils
Error log:
My code:
package.json
Am I implementing something wrong?