morintd / prismock

A mock for PrismaClient, dedicated to unit testing.
https://www.npmjs.com/package/prismock
MIT License
203 stars 23 forks source link

Update method should throw when no records match where clause #1163

Open thw0rted opened 1 week ago

thw0rted commented 1 week ago

In short, calling update with a where selector that does not match an existing record, is supposed to throw an exception indicating that the required record was not found. Instead, Prismock returns null.

Simple repro here, with thanks to @paulsouche for the starter.

ETA: forgot to mention this would be fixed by #1105.