-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
[BUGFIX LTS] ensure “pause on exception” pauses in the right place #15600
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rwjblue
reviewed
Aug 25, 2017
@@ -0,0 +1,66 @@ | |||
import Ember from 'ember'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test should likely be moved to the packages/ember/tests
folder, since it requires the global now.
36f6264
to
cef37d2
Compare
|
It is quite common (like in ember-data’s tests) to not have a global onError handler in tests. But because of the previous state of code, we would still end up paused in the default dispatchError rather then where the actual error was thrown. This addresses the issue, but ensuring onErrorTarget.onerror returns undefined if no onError has been set
The diff between [v1.1.0 and v1.2.0](BackburnerJS/backburner.js@v1.1.0...v1.2.1) includes the following changes: * Allow `onError` to be late bound (and recalculated for each flush). * Make `now()` late bound (allowing for things like `sinon.useFakeTimers()`).
cef37d2
to
65a3e42
Compare
Updated:
I tested both prod and debug builds before pushing, so now we just have to convince sauce labs 😈 ... |
Previously, this test assumed that the only value on `backburner._platform` that was required was `setTimeout`. As of Backburner 1.2.1 this is no longer true (it also requires `.now()`), and really should not have been assumed to begin with. This change simply ensures that `backburner._platform` continues to have all the same methods on it, but uses the test override of `setTimeout` to run its assertions.
Previously, due to always running within a try/catch these errors were swallowed in production build test runs.
65a3e42
to
db55502
Compare
thanks @rwjblue |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It is quite common (like in ember-data’s tests) to not have a global onError handler in tests.
But because of the previous state of code, we would still end up paused in the default dispatchError rather then where the actual error was thrown.
This addresses the issue, but ensuring onErrorTarget.onerror returns undefined if no onError has been set
before:
After: