Step 1: Install the JSDOM Debugger package
Run:
yarn add --dev jsdom-debugger-env
Step 2: Update Jest testEnvironment
Set "testEnvironment" in your Jest config to "jsdom-debugger-env".
Step 3: Use Jest's `it.only`
Change an `it()` to `it.only()` for the test case that you'd like to visualize.
Step 4: Run jest for that file
Run the jest test for the file that you'd like to visualize. Typically, this is:
`yarn jest PATH_TO_TEST_FILE` or `yarn test PATH_TO_TEST_FILE`.
Step 5: Visualize the test on JSDOM Debugger
When your test is done running, a URL for JSDOM Debugger will be logged near the test result. Visit that URL to visualize the test.