-
-
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
[BUG] RSVP's different onerrorDefault behaviour in testing breaks tests #12567
Comments
I believe that #12549 will fix this issue. Can you test? |
I've tested against #12549 - the order has changed as the |
Hmm. Does your error action return true? |
It return |
Just had a thought - is there any chance this could be |
Closing this, I think our tests were hitting a slightly different path than I thought 🙄 |
kk, please ping me if you want another set of eyes on it.... |
In trying to test our
401
error handling in our application route'serror
action I found that it was working fine in development the the adapter error successfully handled/supressed but in our tests theDS.AdapterError
was always being output before ourerror
handler is reached.In short:
error
actionserror
hooks unable to suppress the error which results in failing testsI tracked the problem down to https://github.com/emberjs/ember.js/blob/v1.13.10/packages/ember-runtime/lib/ext/rsvp.js#L54:L65 which has different behaviour when in the test environment.
To workaround the RSVP's test behaviour, in any tests where we are expecting adapter errors to be handled in route
error
actions we have to disable/enable RSVP's error handling:This is quite non-obvious behaviour - I would expect the error handling flow to be the same in my tests as it is in development.
Possibly related: #12547, #12472, #12166, teddyzeenny/ember-mocha-adapter#34
Ember version: 1.13.10
Ember Data version: 1.13.13
The text was updated successfully, but these errors were encountered: