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
@prisma/adapter-d1 is failing with an import error when called inside vitest tests #23911
Comments
Possibly related, also vitest, problem: #23855 |
Hi @mgcrea, thanks for opening this. While we reason about this issue internally, could you please share whether using the |
I could reproduce using the repro mentioned in:
Originally posted by @vladinator1000 in cloudflare/workers-sdk#5685 (comment)
|
Bug description
I'm trying to setup a small Cloudflare Worker app, that leverages
@prisma/adapter-d1
and served by hono, I'm encountering issues when trying to run unit tests. Unfortunately the prisma WASM import fails with the following error:How to reproduce
Create a basic d1 prisma app following the official tutorial
Add a vitest unit test:
Can be fixed with this change in
wasm.js
:but probably breaking other things!
Expected behavior
Prisma should work inside vitest.
Prisma information
// Add your schema.prisma
// Add your code using Prisma Client
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: