4.6.0 and newer does not let me spy using vitest. #16584
Labels
bug/2-confirmed
Bug has been reproduced and confirmed.
kind/bug
A reported bug.
kind/regression
A reported bug in functionality that used to work before.
team/client
Issue for team Client.
Milestone
Bug description
Hi, I'm facing issues in regards to mocking return value when spying on a prisma client. The issue started from Prisma version 4.6.0, and it is still present in 4.7.0. I've attached a minimal reproduction repo for the issue. After 4.6.0, after mocking return value for an initialised prisma client, it still modifies the actual database.
https://github.com/torgesla/prisma-vitest-4.6.0-bug
How to reproduce
Expected behavior
I expect to be able to spy on and mock return value of prisma client as it worked before v4.6.0 was released.
Prisma information
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: