What would this library do? #4
cball
announced in
Announcements
Replies: 1 comment 1 reply
-
|
Some features I think would help this once you can do simple create/builds (drawing mostly from my experience with factory_bot in rails):
Example: I'd be happy to help any way I can. I've been using this library recently, and while it's nifty, it was not made with Prisma in mind, and I've had to hack a lot of things together to make it work. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
prisma-factorywould be used in test in environments to create valid data for tests. It would lean on the types Prisma gives us. Prisma would be a peerDependency.Factory generation is an open discussion, but the current thought is we start by exposing a
createFactoryfunction. Consumers of the lib can use this to create factories for their prisma models.Once a factory is defined, it can be used like so:
This is really powerful for creating data for tests.
Beta Was this translation helpful? Give feedback.
All reactions