--retry=2 gives wrong error: toMatchInlineSnapshot cannot be called multiple times at the same location #6589
Closed
6 tasks done
Labels
p3-minor-bug
An edge case that only affects very specific usage (priority)
Describe the bug
When you use the
--retry=n
flag (wheren > 0
), inline snapshots that succeeded on the first try fail on the retries withtoMatchInlineSnapshot cannot be called multiple times at the same location
. This means that if you precede a flaky assertion with an inline snapshot, the--retry
flag does not work.It sounds like the some state that
toMatchInlineSnapshot
carries needs to be reset between retries.I later learned that
--retry=1
is enough – it’s the number of retries not the number of total tries.Reproduction
https://github.com/lydell/vitest-inline-snapshot-retry
System Info
Used Package Manager
npm
Validations
The text was updated successfully, but these errors were encountered: