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

Add several methods to set up default behaviors. These methods can be… #92

Merged
merged 1 commit into from
Dec 14, 2021

Conversation

timkindberg
Copy link
Owner

… placed anywhere in the mocking set up, including after other calledWith setups, unlike previous "default" behavior using when(fn).mockReturnValue(z). You can now do: when(fn).calledWith(x).mockReturnValue(y).defaultReturnValue(z)

@timkindberg
Copy link
Owner Author

/related #91 @joebowbeer

Copy link

@joebowbeer joebowbeer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

… placed anywhere in the mocking set up, including after other calledWith setups, unlike previous "default" behavior using `when(fn).mockReturnValue(z)`. You can now do: `when(fn).calledWith(x).mockReturnValue(y).defaultReturnValue(z)`.
@timkindberg timkindberg merged commit 67b7532 into master Dec 14, 2021
@timkindberg timkindberg deleted the default_methods branch December 14, 2021 19:47
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

Successfully merging this pull request may close these issues.

2 participants