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...
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
formyFunction.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 likewhen(myFunction).then...
Thanks in advance!