-
Notifications
You must be signed in to change notification settings - Fork 632
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
feat(expect): add expect.{closeTo, stringContaining, stringMatching}
#4508
Conversation
expect.{closeTo, stringContaining, stringMatching}
expect/mod.ts
Outdated
* The asymmetric matchers are not yet fully supported: | ||
* - Supported: | ||
* - `expect.anything` | ||
* - `expect.any` | ||
* - `expect.arrayContaining` | ||
* - `expect.not.arrayContaining` | ||
* - `expect.closedTo` | ||
* - `expect.stringContaining` | ||
* - `expect.not.stringContaining` | ||
* - `expect.stringMatching` | ||
* - `expect.not.stringMatching` | ||
* - Not supported: | ||
* - `expect.objectContaining` | ||
* - `expect.not.objectContaining` |
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.
This doesn't make sense. Within a list of symbols that are not fully supported, there's a list of symbols that are supported. Can you please correct and clarify?
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.
Which ones are you referring to?
expect/mod.ts
Outdated
* The uitlities are not yet fully supported: | ||
* - Supported: | ||
* - `expect.addEqualityTester` | ||
* - `expect.extend` | ||
* - Not supported: | ||
* - `expect.assertions` | ||
* - `expect.hasAssertions` | ||
* - `expect.addSnapshotSerializer` |
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.
Ditto. This doesn't make sense for the same reason as the above list. Please correct and clarify.
Let me know if these changes make sense to you. 👍 |
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.
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.
LGTM. Nice work!
This PR adds these following asymmetric matchers:
Ref: #3964