Skip to content

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

Merged
timkindberg merged 1 commit intomasterfrom
default_methods
Dec 14, 2021
Merged

Add several methods to set up default behaviors. These methods can be…#92
timkindberg merged 1 commit intomasterfrom
default_methods

Conversation

@timkindberg
Copy link
Copy Markdown
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
Copy Markdown
Owner Author

/related #91 @joebowbeer

Copy link
Copy Markdown

@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