You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there a matcher to return a value from literally any kind of parameters, such as:
let f = td.func()
td.when(f(???)).thenReturn('abc')
f() // abc
f('a') // abc
f(1,2,3) // abc
The only way I found was to do:
let f = td.func()
let anything = td.matchers.anything
td.when(f()).thenReturn('abc')
td.when(f(anything())).thenReturn('abc')
td.when(f(anything(), anything(), anything())).thenReturn('abc')
The text was updated successfully, but these errors were encountered:
Is there a matcher to return a value from literally any kind of parameters, such as:
The only way I found was to do:
The text was updated successfully, but these errors were encountered: