-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Describe the bug
When using expect.soft(actual)
combined with a .to<Something>
that returns an AsyncExpectationResult
, the test gets stopped after the first failure.
Initially found this trying to use vitest-plugin-vis
matcher toMatchImageSnapshot
together with expect.soft
to enable getting multiple image comparison result files for a single test case.
A little bit of research (though not sure if it would be the right place to fix things) lead me to jest-extend.ts, line 83 where a promise is augmented to throw an expectation error on failure, instead of handling it similar to wrapAssertion where the test.result.errors
is augmented when using expect.soft
.
Reproduction
StackBlitz here: https://stackblitz.com/edit/vitest-dev-vitest-pvde5zau
Reproduction in basic.test.ts (two tests, comparing an async assertion with a sync one)
System Info
Windows and linux (probably any system), with vitest 3.2.1
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
Type
Projects
Status