vitest
vitest copied to clipboard
expect `toBeNullish`
Clear and concise description of the problem
Sometimes we don't care whether a value is undefined or null, we just want to test that it is nullish.
Suggested solution
I am proposing a new assertion, toBeNullish(). This would test value == null, i.e. that the value is either null or undefined.
Alternative
No response
Additional context
No response
Validations
- [x] Follow our Code of Conduct
- [x] Read the Contributing Guidelines.
- [x] Read the docs.
- [x] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.