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

Allow usage without calledWith or expectCalledWith #24

Closed
wh1t3cAt1k opened this issue May 22, 2019 · 2 comments
Closed

Allow usage without calledWith or expectCalledWith #24

wh1t3cAt1k opened this issue May 22, 2019 · 2 comments

Comments

@wh1t3cAt1k
Copy link

When setting up mocks without any argument expectations, I get the following message:

Unintended use: Only use default value in combination with .calledWith(..), or use standard mocking without jest-when.

However, I would really rather have a single syntax for mock setups across the whole solution.

I understand that it does not play well linguistically with when, but perhaps a more neutral alias can be exposed, like setupMock, which would not produce this warning.

In fact, I am trying to migrate from a homemade solution where the function is named just that: setupMock.

@timkindberg
Copy link
Owner

I'm fine with this, if you'd like to submit a PR. Otherwise not sure if/when I'd get around to it.

@timkindberg
Copy link
Owner

This should now be fixed in v3.4.0

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