-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
docs: update expect.extend
examples
#13195
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,8 +8,8 @@ | |
import {expect} from '@jest/globals'; | ||
import type {MatcherFunction} from 'expect'; | ||
|
||
const toBeWithinRange: MatcherFunction<[floor: number, ceiling: number]> = | ||
function (actual: unknown, floor: unknown, ceiling: unknown) { | ||
const toBeWithinRange: MatcherFunction<[floor: unknown, ceiling: unknown]> = | ||
function (actual, floor, ceiling) { | ||
Comment on lines
-11
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cleaning up. I remember my thinking that |
||
if ( | ||
typeof actual !== 'number' || | ||
typeof floor !== 'number' || | ||
|
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.
Tried it out. Jest will transpile
setupFilesAfterEnv
scripts, so perhaps this can stay in ESM / TS for simplicity.