can anyone help?
im trynig to create tests on my system with feature tests and unit,
i want to create a rollback hook so once a test starts it creates a transaction and when it ends, it rollsback.
i saw so many issues with transactions on prisma, hoping someone would have way to do such thing here.
09/27/2022, 9:34 AM
Hi @Mordechai Tzarfati 👋
Did you have a look at this Testing Guide?
It demonstrates the usage of mockReset which would reset the mocked instance before running each test so each test would run in isolation.
Also this GitHub Discussion regarding Testing has numerous insights which would be useful to you.
Also, can you let us know if you are using prisma for a personal project or a work project?
09/27/2022, 2:47 PM
work project, i saw the testing guide but this one was only for jest, and im working with ava 😕
09/28/2022, 11:55 AM
Oh, I don’t think we have any docs for testing on using with Ava, @Sabin Adams is working on creating a guide for testing, maybe this is something which could be included in the guide.
09/28/2022, 12:23 PM
Thanks for the CC here, I’ll add this to the list I’m compiling on topics to cover!