D
D
Deodatuss2018-03-02 18:08:30
Software testing
Deodatuss, 2018-03-02 18:08:30

How to smoke Php(Web)Storm to test Create React App?

Good day. There is an open-source Create React App, Jest is naturally used for testing. Prior to this, tests were run in the console by calling npm test. But at some point, breakpoints were required and, accordingly, PhpStorm had to be smoked somehow for the whole thing. On ordinary js files without react, everything works out with a bang, breakpoints work, everyone is happy. But as soon as React components come on the scene and, suddenly, jest.mock(...) everything stops working and crashes with a strange error:
Cannot find module 'package.json'
Maybe someone has done this whole thing and has advice on how to make everything work fine? Just in case, I will attach the config of the gesture in the storm:
5a9968e87cb8d437693294.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question