-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Open
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)upstream
Description
Describe the bug
Encountered unexpected behavior where throwing undefined
still passed the tests. This occurred because I created a mock function meant to check the error before throwing, but I forgot to implement the check.
Expected behavior: expect(() => { throw undefined }).toThrow('Input validation failed')
should fail.
Reproduction
Expected behavior: expect(() => { throw undefined }).toThrow('Input validation failed')
should fail.
System Info
System:
OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
CPU: (8) x64 Intel(R) Core(TM) i5-8265U CPU @ 1.60GHz
Memory: 2.06 GB / 7.57 GB
Container: Yes
Shell: 5.9 - /usr/bin/zsh
Binaries:
Node: 22.12.0 - ~/.nvm/versions/node/v22.12.0/bin/node
npm: 10.9.0 - ~/.nvm/versions/node/v22.12.0/bin/npm
pnpm: 9.15.2 - ~/.nvm/versions/node/v22.12.0/bin/pnpm
Browsers:
Chrome: 131.0.6778.264
npmPackages:
@vitest/coverage-v8: ^2.1.1 => 2.1.8
vitest: ^2.1.8 => 2.1.8
Used Package Manager
pnpm
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Metadata
Metadata
Assignees
Labels
p3-minor-bugAn edge case that only affects very specific usage (priority)An edge case that only affects very specific usage (priority)upstream