$ npm install @vitest/spy
Lightweight Jest-compatible mocking implementation.
GitHub | Documentation