[BUGFIX LTS] ensure “pause on exception” pauses in the right place#15600
Merged
[BUGFIX LTS] ensure “pause on exception” pauses in the right place#15600
Conversation
rwjblue
reviewed
Aug 25, 2017
| @@ -0,0 +1,66 @@ | |||
| import Ember from 'ember'; | |||
Member
There was a problem hiding this comment.
This test should likely be moved to the packages/ember/tests folder, since it requires the global now.
36f6264 to
cef37d2
Compare
Contributor
|
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
Member
|
Updated:
I tested both prod and debug builds before pushing, so now we just have to convince sauce labs 😈 ... |
added 2 commits
September 21, 2017 12:14
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
Member
Author
|
thanks @rwjblue |
This file contains hidden or 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
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: