-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Problems mocking MockConnection error response #7471
Comments
Hi, So the problem is that MockConnection method to mock error response accepts an instance of Error which does not allow to pass response object to error handler. Cast to any allows to bypass type checks so we can finally pass the response, but to me it looks like a dirty hack. Is this a bug in MockConnection API or do we do something wrong? Thank you, |
+1 interested on this. |
Anyone have a solution to this yet? |
+1 ... bump |
Could somebody add a minimal repro ? thanks |
Thanks for reporting this issue. However, you didn't provide sufficient information for us to understand and reproduce the problem. Please check out our submission guidelines to understand why we can't act on issues that are lacking important information. If the problem still persists, please file a new issue and ensure you provide all of the required information when filling out the issue template. |
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. |
I'm testing http service in Angular2. I want to test the server, the server responds 'Unauthorized Error'. In test I used this code:
In test I used handleError from angular.io..
It is the wrong decision. Tell me how to test this situation.
The text was updated successfully, but these errors were encountered: