Skip to content

Instantly share code, notes, and snippets.

@ezy
Last active September 14, 2023 00:09
Show Gist options
  • Select an option

  • Save ezy/780cb261a68b41b7ca086915a433b238 to your computer and use it in GitHub Desktop.

Select an option

Save ezy/780cb261a68b41b7ca086915a433b238 to your computer and use it in GitHub Desktop.
Debugging Qunit tests

Run the tests using ember test -f 'acceptance' --serve. This will persist the browser, and will run the tests on source code change. You will be presented with the testem interface.

The way I step through the tests is in the test source code, guess where you think the tests are failing, and insert a pauseTest();. When the tests run in the browser, tick the development tickbox, and the testem interface will disppear, but you will notice the test run. It should stop at the point where you put the pauseTest in. Open up the devtools and use the console like an interactive debugger, except if you want to step forward, just copy and paste the code from the test into the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment