To visialize the DOM
screen.logTestingPlaygroundURL();
Print the DOM
screen.debug();
Limit the number of tests:
describe.only or test.only
Setting up debugger:
- in
package.json
add a script:react-scripts --inspect-brk test --runInBand --no-cache
- add a
debugger;
statement somewhere in tests or component - use test.only or describe.only
- run the above script command
- navigate to
about:inspect
in browser