Skip to content
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

unit testing, why callThrough is used? #177

Closed
muhammedbasilsk opened this issue Nov 21, 2016 · 3 comments
Closed

unit testing, why callThrough is used? #177

muhammedbasilsk opened this issue Nov 21, 2016 · 3 comments

Comments

@muhammedbasilsk
Copy link
Contributor

Hey @lathonez ,

I have a doubt on a line you wrote in the spec.

spyOn(instance['clickerService'], 'newClicker').and.callThrough();

Here why should we use callThrough (which will trigger the actual service instead of the mock.) ? Why the mock service method is not used here?

@lathonez
Copy link
Owner

@muhammedbasilsk
Copy link
Contributor Author

Thanks for the explanation. Really appreciate it. 👍

@lathonez
Copy link
Owner

#191

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants