Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set a breakpoint when the window is about to unload. #10417

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

NullVoxPopuli
Copy link
Contributor

Any time the window is going to unload during tests, it's inanely hard and annoying to debug which test is being problematic.

Setting a debugger in code gives folks a stack that they can trace back to their test to see what was going wrong.

@@ -5,6 +5,14 @@ import { setApplication } from '@ember/test-helpers';
import { setup } from 'qunit-dom';
import { start } from 'ember-qunit';

window.addEventListener('beforeunload', function() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note, and this is potentially workflow altering --

  • live reload triggers this as well
  • and also regular refresh button clicking / f5

idk if there is a way to skip around this during live reload... but that'd be ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant