The following lines need to be added to package.json or. If you add this to package.json, react-scripts won't let you run npm test since it doesn't support overwriting of the transform options. transform: stop errors when importing files such as svg. runInBand: stop Jest from spawning tests in worker processes nolazy: fully compile code so that we can use breakpoints correctly I did finally get it to work, using this config in launch.json: " I also use VSCode, and in 2018 the above configuration did not work for me. What is the proper way to debug jest unit test on create-react-app? To start debugging, open the following URL in attached.Įrror: Cannot find module '/Users/asafkatz/dev/newmaps/node_modules/.bin/jest'Īt Function.Module._resolveFilename (module.js:455:15)Īt Function.Module._load (module.js:403:25)Īt (module.js:590:10) Warning: This is an experimental feature and could change at any time. nodemodules/. I got this error instead: node -debug-brk -inspect. as Jest documentation says, debugging is possible using this command: node -debug-brk -inspect. Unfortunately, it's not working with create-react-app. I use create-react-app and I would like to debug my unit testsĪs Jest documentation says, debugging is possible using this command: node -debug-brk -inspect.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |