-
-
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
fix: switch ExpectStatic any
types to AsymmetricMatcher<unknown>
, with DeeplyAllowMatchers<T>
#7016
base: main
Are you sure you want to change the base?
fix: switch ExpectStatic any
types to AsymmetricMatcher<unknown>
, with DeeplyAllowMatchers<T>
#7016
Conversation
any
types to unknown
any
types to unknown
✅ Deploy Preview for vitest-dev ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
How is this going to work? expect(obj).toEqual<{
id: string
name: string
}>({
id: expect.any(String),
name: 'Amelia',
}) Error:
|
Aha! Updated to use a |
any
types to unknown
any
types to AsymmetricMatcher<unknown>
, with DeeplyAllowMatchers<T>
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 keeps getting updated and I don't know why. 🤷 I'll revert it if it's still here if & when the PR gets un-drafted.
Description
Switches the two
any
types tounknown
AsymmetricMatcher<unknown>
, and updated APIs such astoEqual<T>
to deeply allow those using a newDeeplyAllowMatchers<T>
.Sending as a draft for reference.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
I don't know how to best do this. Do you want a type test somewhere?I added atypes.test.ts
file but am 100% sure I missed a much better way to do thatpnpm-lock.yaml
unless you introduce a new test example.Tests
pnpm test:ci
.Documentation
pnpm run docs
command.Changesets
feat:
,fix:
,perf:
,docs:
, orchore:
.