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

Visually notify of uncaught exceptions breaking client tests #9034

Merged
merged 2 commits into from Aug 23, 2017

Conversation

hwillson
Copy link
Contributor

This PR is intended to help fix #4979. I know external package Tinytest use has dwindled since adding --driver-package support to meteor test-packages, but since we are still supporting it (and it's used by the Meteor core), we might as well improve the test-in-browser UI experience a bit (let me know if anyone disagrees!).

These changes add a global window.onerror event handler to the test-in-browser package, to catch any previously uncaught exceptions. When uncaught exceptions are found, an alert like the following is shown at the top of the test-in-browser UI:

screenshot 2017-08-22 09 24 27

This should help notify developers of potential errors behind the scenes, that are preventing the client side tests from running.

(P.S. --> I snuck ecmascript in there ... hope that's okay!)

These changes add a global `window.onerror` event handler
to the `test-in-browser` package, to catch any previously
uncaught exceptions. When uncaught exceptions are found,
an alert box is displayed above the test results table.
This should help notify developers of hidden uncaught
exceptions that could be preventing client tests from
running.

Fixes meteor#4979.
@benjamn
Copy link
Contributor

benjamn commented Aug 22, 2017

Oh wow, this is awesome!

@@ -5,6 +5,7 @@ Package.describe({
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we need to bump the test-in-browser package version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops - good catch. Yes, we should - I've bumped it to 1.0.14. Thanks!

@benjamn benjamn merged commit cd54054 into meteor:devel Aug 23, 2017
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.

Tinytest silently ignores all tests on uncaught errors
2 participants