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

Projects
None yet
2 participants
@hwillson
Member

hwillson commented Aug 22, 2017

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!)

Visually notify of uncaught exceptions breaking client tests
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 #4979.
@benjamn

This comment has been minimized.

Member

benjamn commented Aug 22, 2017

Oh wow, this is awesome!

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

This comment has been minimized.

@benjamn

benjamn Aug 22, 2017

Member

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

This comment has been minimized.

@hwillson

hwillson Aug 23, 2017

Member

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

10 of 11 checks passed

ci/circleci: Group 2 CircleCI is running your tests
Details
CLA Author has signed the Meteor CLA.
Details
ci/circleci: Get Ready Your tests passed on CircleCI!
Details
ci/circleci: Group 0 Your tests passed on CircleCI!
Details
ci/circleci: Group 1 Your tests passed on CircleCI!
Details
ci/circleci: Group 3 Your tests passed on CircleCI!
Details
ci/circleci: Group 4 Your tests passed on CircleCI!
Details
ci/circleci: Group 5 Your tests passed on CircleCI!
Details
ci/circleci: Group 6 Your tests passed on CircleCI!
Details
ci/circleci: Group 7 Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment