You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this actually adds a lot of complication, isn't used that much, and is probably the wrong tool for the job. I think that spies and stubs are a better solution and allow us to focus more clearly on what we're trying to test. We don't actually use the MockUserService much, so I think we can just get rid of it, moving the necessary stubs directly into the relevant tests.
If we do this, then I think we can also remove the | null from the constructor in UserService, and drop all the !s in that file that were added because the httpClient could be null.
The text was updated successfully, but these errors were encountered:
I think this actually adds a lot of complication, isn't used that much, and is probably the wrong tool for the job. I think that spies and stubs are a better solution and allow us to focus more clearly on what we're trying to test. We don't actually use the
MockUserService
much, so I think we can just get rid of it, moving the necessary stubs directly into the relevant tests.If we do this, then I think we can also remove the
| null
from the constructor inUserService
, and drop all the!
s in that file that were added because thehttpClient
could benull
.The text was updated successfully, but these errors were encountered: