Skip to content

Conversation

@noxify
Copy link
Owner

@noxify noxify commented Sep 3, 2025

With this PR we provide a generic test setup for all adapters.
This ensures, that we have to write our tests only once and everything works the same way.

With this change, we're switching from PGLite for drizzle/kysely to testcontainers/postgres, because we need it for prisma.

TODO:

  • Migrate all tests to the shared-tests package
  • [x[ Update all package tests to use the wrapper functions to run the tests
  • Create a new github workflow to run the tests with different postgres versions
  • Fix prisma test issues ( see Optimize tests #27 (comment) )

closes #21

@changeset-bot
Copy link

changeset-bot bot commented Sep 3, 2025

🦋 Changeset detected

Latest commit: 973c2e2

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@vorsteh-queue/adapter-prisma Patch
@vorsteh-queue/adapter-drizzle Patch
@vorsteh-queue/adapter-kysely Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Sep 3, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
vorsteh-queue-docs Ready Ready Preview Comment Sep 4, 2025 3:45pm

@pkg-pr-new
Copy link

pkg-pr-new bot commented Sep 3, 2025

Open in StackBlitz

@vorsteh-queue/adapter-drizzle

npm i https://pkg.pr.new/noxify/vorsteh-queue/@vorsteh-queue/adapter-drizzle@27

@vorsteh-queue/adapter-kysely

npm i https://pkg.pr.new/noxify/vorsteh-queue/@vorsteh-queue/adapter-kysely@27

@vorsteh-queue/adapter-prisma

npm i https://pkg.pr.new/noxify/vorsteh-queue/@vorsteh-queue/adapter-prisma@27

@vorsteh-queue/core

npm i https://pkg.pr.new/noxify/vorsteh-queue/@vorsteh-queue/core@27

create-vorsteh-queue

npm i https://pkg.pr.new/noxify/vorsteh-queue/create-vorsteh-queue@27

commit: 973c2e2

@noxify
Copy link
Owner Author

noxify commented Sep 3, 2025

it seems that prisma 6.15 w/ prisma-client returns the specifed name in @map ( e.g. process_at ) after running the db.table.create statement, instead the expected model field name ( e.g. processAt ).

TODO: create a repro to ensure it's not just user handling :D

works as expected - The queryRaw method returns always the db field names, not the field name from the schema.

Solution
Create a "pre transformer" to replace the db field names ( e.g. process_at ) with the expected schema names ( e.g. processAt ).

@noxify noxify merged commit f2cc9c7 into main Sep 4, 2025
27 checks passed
@noxify noxify deleted the optimize-tests branch September 4, 2025 15:46
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.

Optimize tests

2 participants