posva / vue-router-mock

🧪 Easily mock routing interactions in your Vue apps
MIT License
201 stars 7 forks source link

Update spy documentation #239

Closed BenShelton closed 10 months ago

BenShelton commented 10 months ago

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.

posva commented 10 months ago

Thanks!