golevelup / nestjs

A collection of badass modules and utilities to help you level up your NestJS applications 🚀
MIT License
2.16k stars 244 forks source link

ts-vitest: using with `vi.spyOn` isn't working #737

Open micalevisk opened 2 months ago

micalevisk commented 2 months ago

when we have a testing module like this:

image

using vi.spyOn(productPriceRepository, 'findOne') throws the following error:

image

While it works if we use a simple vi.fn() like this:

image