The previous documentation suggested using spy.mockReset() when adding custom spy functionality with vitest. However this doesn't match the automatic implementation, which uses spy.mockClear().
Using mockReset causes issues where the spy doesn't return a promise and can break tests. mockClear works as expected.
Making this change to avoid any confusion for future users.
The previous documentation suggested using
spy.mockReset()
when adding custom spy functionality with vitest. However this doesn't match the automatic implementation, which usesspy.mockClear()
.Using
mockReset
causes issues where the spy doesn't return a promise and can break tests.mockClear
works as expected.Making this change to avoid any confusion for future users.