-
Notifications
You must be signed in to change notification settings - Fork 25.8k
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
feat(http): xhr error listener invokes onError #2667
Conversation
PatrickJS
commented
Jun 21, 2015
8f1d040
to
7db005d
Compare
This looks good, but we need a test... |
ba6793c
to
5446c6f
Compare
alright I rebased, refactored, and added a test. |
oops I was cleaning up old branches and accidently deleted this |
@@ -95,6 +95,15 @@ export function main() { | |||
expect(abortSpy).toHaveBeenCalled(); | |||
}); | |||
|
|||
it('should create an error Response on error', inject([AsyncTestCompleter], async => { | |||
var connection = new XHRConnection(sampleRequest, new MockBrowserXHR(), |
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.
By setting the type to ResponseTypes.Error
on this ResponseOptions
object, you're setting the default type to be Error, which is bad for the test, since we want to test that XHRBackend
is smart enough to set the type as error based on the xhr erroring or getting a status that is considered an error.
@jeffbcross ping... |
@gdi2290 finally scheduled this to be merged, thanks! https://github.com/angular/angular/tree/presubmit-jeffbcross-pr-2667 |
thanks! |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |