This is a simple implementation of mocking database tests without hitting the database This is necessary and handy when testing functionalities of your application
To get started with the project
- Nodejs
- Expressjs
- SQLite
- Jest
Run
<npm|pnpm|yarn> install
Then initialize your db
npx prisma init --datasource-provider sqlite
Make initial migrations
npx prisma migrate dev --name init
You can use the prisma studio to visualize the models defined
npx prisma studio
To run tour tests just run
npm run test