docs: clarify condition on expect.anything (#8356)

This commit is contained in:
Daniel Sidhion 2025-07-29 05:54:48 -07:00 committed by GitHub
parent 13f9462293
commit b8cb62104e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1502,7 +1502,7 @@ test.each(errorDirs)('build fails with "%s"', async (dir) => {
- **Type:** `() => any`
This asymmetric matcher, when used with equality check, will always return `true`. Useful, if you just want to be sure that the property exist.
This asymmetric matcher matches anything except `null` or `undefined`. Useful if you just want to be sure that a property exists with any value that's not either `null` or `undefined`.
```ts
import { expect, test } from 'vitest'