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

Argument count of mocked method #201

Open
flugg opened this issue Aug 31, 2020 · 0 comments
Open

Argument count of mocked method #201

flugg opened this issue Aug 31, 2020 · 0 comments

Comments

@flugg
Copy link

flugg commented Aug 31, 2020

Hi. Love the library, but having an issue where my code is checking the expected number of parameters of a function and only sending a value based on the count. However, a mocked function will always return 0 for myFunction.length. Any way to bypass this?

Also, somewhat related, at the moment you need to do when(myFunction(anything(), anything())).then..., any way to tell it to do something without predefining the count of arguments? Something like when(myFunction).then...

Thanks in advance!

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

1 participant