What problem does it solve? Writing database tests that mock the query layer proves nothing about the SQL that actually runs and silently rots as the schema changes. This Skill provides the conventions, templates, and mandatory patterns for writing DB integration tests that hit a real local PostgreSQL instance, ensuring query logic, foreign key constraints, and data transformations are genuinely validated. ## Core Features & Use Cases - Standardized test structure: Enforces bun:test framework, domain-based file organization under packages/db/integration/, and read/write test separation. - Fixture lifecycle rules: Mandates beforeAll/afterAll fixture management with tracked cleanup, AggregateError teardown, and random nonces for test data isolation. - Coverage verification: Guides running the coverage script and reading lcov.info to confirm every exported query function is exercised. - Banned pattern enforcement: Prohibits DB mocking, vitest, raw SQL, and silent error swallowing. - Use Case: After adding a new query function to packages/db, use this Skill to write an integration test that inserts fixtures, calls the query via dbRead/dbWrite, asserts on the Result type, and verifies coverage shows the function executed. ## Quick Start Write an integration test for the new query function in packages/db following the db-integration-tests conventions and verify it appears in the coverage report.