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

Resetting particular stub #34

Closed
waterplea opened this issue Aug 17, 2017 · 2 comments
Closed

Resetting particular stub #34

waterplea opened this issue Aug 17, 2017 · 2 comments

Comments

@waterplea
Copy link

This is more of a question than an issue. I just started using ts-mockito and I am wondering if it is possible to "re-stub" a method to return different value? I am stubbing my method in beforeEach with a value that works for all tests but there is one particular test where I want it to return a different value. I know I can reset the mock, but that would remove ALL of the stubs, while I just want to change one. Is it possible?

@waterplea
Copy link
Author

Looks like writing a new when() works, I guess it was my code that invalidated it when I tried it at first.

@NagRock
Copy link
Owner

NagRock commented Aug 23, 2017

Thanks for info. I Hope You like ts-mockito :)

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