Hello all 👋
How are you defining fake data / seeds / fixtures in your tests involving Prisma?
I’m surprised prisma-test-utils which seems very useful is unmaintained. Is there anything replacing it?
r
Ryan
06/29/2021, 5:16 AM
@Julien Goux 👋
For now you would need to manually call the script that has your fixtures as we do not support that directly.
It would be great if you could add a feature request for fixtures so that we can look into this 🙂
j
janpio
06/29/2021, 1:08 PM
Prisma Test Utils unfortunately is from a few iterations ago, we had to abandon it because we were lacking a way to tell it what data the column actually can take (as Native Types where not a thing yet).
janpio
06/29/2021, 1:09 PM
Now that exists of course, but picking up Test Utils is quite an effort.
janpio
06/29/2021, 1:09 PM
Happy to accept PRs 😄
j
Julien Goux
06/30/2021, 7:12 AM
Ok but then without prisma test utils, how are people dealing with fixtures / seeds?
j
janpio
06/30/2021, 7:21 AM
Usually they write it statically in a seed script, or use faker there, or even export an existing database into a seed script - those are the 3 things I have seen ppl do.