{"repo":"codepunkt/vitest-environment-prisma-postgres","free":true,"listed":false,"github":"https://github.com/codepunkt/vitest-environment-prisma-postgres","clone":"git clone https://github.com/codepunkt/vitest-environment-prisma-postgres.git","description":"Vitest environment for Prisma & PostgreSQL designed for fast integration tests: seed your database once with production-like data, then run each test in a transaction that is rolled back after execution. Tests remain isolated without expensive reseeding.","language":"TypeScript","stars":42,"topics":["database","javascript","nodejs","orm","performance","postgres","postgresql","prisma","prisma-client","seed"],"license":"MIT","category":"databases-storage","readme_excerpt":"vitest-environment-prisma-postgres Features &nbsp;&nbsp;•&nbsp;&nbsp; Installation & Setup &nbsp;&nbsp;•&nbsp;&nbsp; TypeScript Configuration &nbsp;&nbsp;•&nbsp;&nbsp; Known Limitations Motivation Vitest environment for Prisma + PostgreSQL designed for fast integration tests. Integration tests against a database are often slow because each test needs its own database state. Teams typically either: - Reseed the database before every test, or - Insert all required data inside each test. Both approaches are slow, repetitive, and dominate test runtime. This environment eliminates that cost. You run migrations and seed your test database once. Each test then runs inside its own database transaction, which is rolled back automatically after the test finishes. Your tests stay isolated, realistic, and extremely fast, creating dedicated data for every test. If you want to understand the full design rationale, implementation details, and performance benchmarks behind this environment, check out the in-depth article on my blog: https://codepunkt.de/writing/blazing-fast-prisma-and-postgres-tests-in-vitest/ Features - Run integration tests against a real PostgreSQL instance. - Seed your database once at the beginning of the test run. - Tests run inside sandboxed transactions, but application-level transactions still work normally. - Test transactions are rolled back after every test. - Tests are isolated, fast, and order independent. Installation & Setup Requires Node.js 20 or newer (CI c","default_branch":null,"files":null,"tree":[],"storefront":"/r/codepunkt","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/codepunkt/vitest-environment-prisma-postgres/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}