Skip to content

Tests don't run queries #6917

Answered by janpio
tradical-allstripes asked this question in Q&A
Discussion options

You must be logged in to vote

The issue I'm encountering now is that Prisma is straight up not running the queries in tests, but does not fail or error out in any way.

Prisma queries are async and need to be awaited. Right now you are not doing that before logging the results - which at that point in time do not exist. Just putting the queries like this probably does not even start them. If you sprinkle in a few await or .then() the queries should actually be executed.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@tradical-allstripes
Comment options

@tradical-allstripes
Comment options

Answer selected by janpio
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants