-
Notifications
You must be signed in to change notification settings - Fork 665
feat(expect): add asymmetric matchers (#3964) #4366
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
Conversation
|
@iuioiua is this going the right direction? Are you missing something? |
|
I'll leave this one to @kt3k, who's lead |
expect/_anything_test.ts
Outdated
| import { expect } from "./expect.ts"; | ||
| import { AssertionError, assertThrows } from "../assert/mod.ts"; | ||
|
|
||
| Deno.test("expect().anything()", () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit:
| Deno.test("expect().anything()", () => { | |
| Deno.test("expect.anything()", () => { |
|
@javihernant This looks heading in the right direction to me! |
| Deno.test("expect.anything() as a parameter of toHaveBeenCalled()", () => { | ||
| const mockFn = fn(); | ||
| mockFn(3); | ||
| expect(mockFn).toHaveBeenCalledWith(expect.anything()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
kt3k
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks nicely implemented and tested! Thanks for your contribution!
Uh oh!
There was an error while loading. Please reload this page.