Mocking prisma client with javascript
How can I mock prisma client with javascript?
The guides I found are heavily depended on typescript
Solution:Jump to solution
Hi @Osamu
Can you take a look at this repo ? I created a mock example in Javascript using Prisma....
GitHub
GitHub - ludralph/mocking_playground
Contribute to ludralph/mocking_playground development by creating an account on GitHub.
11 Replies
Solution
GitHub
GitHub - ludralph/mocking_playground
Contribute to ludralph/mocking_playground development by creating an account on GitHub.
It's based off of the guides but i used Javascript instead of Typescript.
That's actually pretty cool thanks man
I hope this gets into the documentation soon
I'll add a similar example to the Prisma Example repository so it can be easy for our users to find.
GitHub
GitHub - prisma/prisma-examples: 🚀 Ready-to-run Prisma example proj...
🚀 Ready-to-run Prisma example projects. Contribute to prisma/prisma-examples development by creating an account on GitHub.
Pardon but it should work with es6 right?
Or does it need more configuration?
I've tried to implement it I kept getting problem related to ES6
I couldn't mock the prisma client sadly
Can you please share the error you're facing?
I'm trying to use es6
You need to configure Jest to support ES6 module. You could check resources online on how to do that
Thank you
You're welcome