We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
withContext
Proposal: allow test double stubbing/verification configuration to specify the value of this that's bound when the test double function is called.
this
td.when(myTd(), {withContext: window})).thenReturn(5) myTd() // undefined myTd.bind(window)() // 5
And for verify:
myTd() td.verify(myTd(), {withContext: window})) // blows up myTd.bind(window)() td.verify(myTd(), {withContext: window})) // passes
Also, argument matchers should be supported:
myTd.bind(new Promise())() td.verify(myTd(), {withContext: td.matchers.argThat(arg => arg instanceof Promise)})) // passes
Thoughts?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Proposal: allow test double stubbing/verification configuration to specify the value of
this
that's bound when the test double function is called.And for verify:
Also, argument matchers should be supported:
Thoughts?
The text was updated successfully, but these errors were encountered: