react unit test, input npm test in cmd keeps reporting errors
require
App.test.js
package.json
react unit test, input npm test in cmd keeps reporting errors
require
App.test.js
package.json
Why using mocha, when configuring with react testing is troublesome because babel is required.
it is recommended to use jest for testing.
if you have to use mocha, try it:
mocha --compilers js:babel-core/register ...
reference article:
Previous: How do create react app-packaged applications come with service worker, to update applications?
Next: How to monitor the return event of Wechat browser in the H5 page?
use mocha&enzyme for component unit testing. Now, due to webpack configuration problems, mocha load error is reported. Is there any configuration scheme? all kinds of loader error webpackrc used by dva this file does not know how to get to the inte...