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

Add official driver adapter for pgmock #23930

Open
nahtnam opened this issue Apr 23, 2024 · 0 comments
Open

Add official driver adapter for pgmock #23930

nahtnam opened this issue Apr 23, 2024 · 0 comments

Comments

@nahtnam
Copy link

nahtnam commented Apr 23, 2024

Problem

Currently Prisma does not have support for any sort of in-memory postgres database adapter. This makes testing harder and requires an actual postgres instance running for any sort of integration test

Suggested solution

Recentlyhttps://github.com/stackframe-projects/pgmock has popped up.

If Prisma were to build an official adapter for this tool, we could start using it in Jest/Vitest and load it with dummy data for testing

Related request: #23752
Related request: #11129

Alternatives

Option 1: Run a full blown postgres database
Option 2: Run prisma with sqlite when testing (there will be incompatibilities)
Option 3: Support something like pg-mem (https://github.com/oguimbal/pg-mem) (not supported yet)

Additional context

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants