-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: add expect.addEqualityTesters API #4586
Conversation
✅ Deploy Preview for fastidious-cascaron-4ded94 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
test/core/test/jest-expect.test.ts
Outdated
@@ -892,3 +893,87 @@ it('correctly prints diff with asymmetric matchers', () => { | |||
}) | |||
|
|||
it('timeout', () => new Promise(resolve => setTimeout(resolve, 500))) | |||
|
|||
describe.only('custom equality testers', () => { |
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.
you probably forgot to remove the .only
on this one 😉
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.
Ohhh, Thanks~
…t into feat/jest-custom-testers * 'feat/jest-custom-testers' of github.com:eryue0220/vitest: fix(vitest): correctly support CSS variable when using happy-dom (#4601) fix: date prototype when using setSystemTime (#4584) fix: respect trailing slash when filtering by file path (#4538) docs: correction to configuration parameter (#4587) chore(deps): update dependency @iconify-json/logos to ^1.1.39 (#4596) chore(deps): update dependency @iconify-json/carbon to ^1.1.22 (#4595) chore(deps): update dependency @antfu/ni to ^0.21.10 (#4594) fix(runner): preserve fixtures when calling runif and skipif (fix #4585) (#4591) chore(deps): update dependency @types/jsdom to ^21.1.6 (#4597) fix(vitest): Add import-meta.d.ts (#4571) fix(browser): allow for `pretty-format` as a sibling dependency (#4590)
Hi @sheremet-va is there any idea about the CI? It always fails with time out. |
packages/expect/src/state.ts
Outdated
) | ||
} | ||
|
||
setState({ customTesters: [...testers] }, (globalThis as any)[GLOBAL_EXPECT]) |
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 breaks compatibility with Jest, there it doesn't override testers
, but pushes a new one
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.
Thanks~ Done
@eryue0220 Could you please take a look at #4880, it is dublicate of this PR but with some differences.
|
Yeah, I've checked the PR, and you're right. I'll close this pr. |
Description
Fix: #4520
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
pnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.