mercredi 14 novembre 2018

How to debug Jest tests in the browser?

How do you guys proceed when having to debug Jest tests? I remember back in the days, when I was using Mocha, I could use a headless browser to do CLI testing but there was also the possibility of loading the tests into a browser and use more powerful debugging capabilities like Chrome Dev Tools. For example, console.log with Jest just plainly sucks.

I tried to use https://jestjs.io/docs/en/troubleshooting and use Node Debugger but its behavior is erratic (it doesn't always connect to the debugger or stops at the right place) and console.log is not output to the console.

Is there a way I'm not aware of of having the same functionality in Jest?

Aucun commentaire:

Enregistrer un commentaire