Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SRI - Implement mocking of the Prisma client for unit testing purposes #742

Closed
1 task done
ognjenkurtic opened this issue Sep 10, 2023 · 2 comments · Fixed by #786
Closed
1 task done

SRI - Implement mocking of the Prisma client for unit testing purposes #742

ognjenkurtic opened this issue Sep 10, 2023 · 2 comments · Fixed by #786
Assignees
Milestone

Comments

@ognjenkurtic
Copy link
Collaborator

ognjenkurtic commented Sep 10, 2023

Overview

Currently there is too much bolierplate when bootstraping a unit test, as we are mocking every single storage agent. We can avoid this by mocking the prisma client and having it setup as a kind of in-memory database. Scope fo this one is to research https://github.com/demonsters/prisma-mock or any other prisma mocking library and, if suitable, implement a POC for a single set of unit tests (you can find candidates by searching for this issue id in the TODO comments)

Reference

Questions

  • Does this libary cover all the Prisma features we are using?
  • Are there other libs we could use?

Acceptance

  • Lib validated
  • POC on a single set of unit tests implemented

Tasks

  • Do it
@ognjenkurtic ognjenkurtic added this to the mil5 milestone Sep 10, 2023
@ognjenkurtic ognjenkurtic changed the title Implement mocking of the Prisma client for unit testing purposes SRI - Implement mocking of the Prisma client for unit testing purposes Sep 10, 2023
@skosito skosito self-assigned this Nov 30, 2023
@ognjenkurtic
Copy link
Collaborator Author

ognjenkurtic commented Feb 28, 2024

@skosito could you please open relevant issues to apply the changes from #786 in other places?

@skosito
Copy link
Collaborator

skosito commented Feb 28, 2024

@skosito could you please open relevant issues to apply the changes from #786 in other places?

yes, here it is #788
we can close this one

@skosito skosito closed this as completed Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants