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

fix(api): fixed the the app.e2e-spec.ts by mocking the PrismaService #140

Merged
merged 3 commits into from
May 30, 2023
Merged

Conversation

VarunGitGood
Copy link
Contributor

@VarunGitGood VarunGitGood commented May 26, 2023

changed the file layout a bit there was no PrimsaModule so used nest CLI to generate it made sure everythingworks

closes #132

@VarunGitGood VarunGitGood linked an issue May 26, 2023 that may be closed by this pull request
46 tasks
@VarunGitGood
Copy link
Contributor Author

@AnshulMalik @yuvrajsab can you please review this

Thanks!!

@AnshulMalik
Copy link
Collaborator

Hey @varun7singh, Thanks for the PR.

The current mock approach, we won't be able to test the actual functionality in future, we need to mock the client, but should behave like prisma client and not connect to actual database at the same time.

Here is how the official documentation suggests:
https://www.prisma.io/docs/guides/testing/unit-testing

@VarunGitGood
Copy link
Contributor Author

VarunGitGood commented May 27, 2023

Oh okay sure
Thanks !! will look into it and commit again

@VarunGitGood
Copy link
Contributor Author

@AnshulMalik do look into this PR i referred to the docs and use mockDeep to create a mock instance of PrismaService

do let me know for any more changes

Thanks !!

@AnshulMalik AnshulMalik merged commit 3b3ee64 into Samagra-Development:Roadmap-2023 May 30, 2023
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 this pull request may close these issues.

Roadmap 2023 Fix AppController end-to-end testcase
2 participants