-
Notifications
You must be signed in to change notification settings - Fork 630
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): support expect.extend()
api
#4412
Conversation
expect/expect.ts
Outdated
@@ -94,7 +98,7 @@ const matchers: Record<MatcherKey, Matcher> = { | |||
toThrow, | |||
}; | |||
|
|||
export function expect(value: unknown, customMessage?: string): Expected { | |||
export const expect = (value: unknown, customMessage?: string): Expected => { |
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.
We have a style guide about this. We prefer function
over arrow syntax https://docs.deno.com/runtime/manual/references/contributing/style_guide#top-level-functions-should-not-use-arrow-syntax
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.
Oh, thank you. I missed it.
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.
Nicely implemented! Thanks!
expect.extend
apiexpect.extend()
api
This pr is one of prs to solve #3964, which is to support
expect.extend
api.