can anyone help? im trynig to create tests on my s...
# orm-help
m
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.
1
anyone?
n
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?
m
work project, i saw the testing guide but this one was only for jest, and im working with ava 😕
@Nurul
n
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.
s
Thanks for the CC here, I’ll add this to the list I’m compiling on topics to cover!
🙌 1