{"library":"pgsql-test","type":"library","category":null,"description":"pgsql-test is a Node.js and TypeScript library, currently at version 4.9.1, that provides instant, isolated, and role-aware PostgreSQL databases for integration testing. It differentiates itself by ensuring each test runs within its own transaction or savepoint, which offers complete isolation, automatic rollbacks, and clean state management without polluting external database environments. Key features include support for testing Row-Level Security (RLS) via `setContext()`, flexible data seeding options (including SQL files, programmatic seeds, and integration with `pgpm` modules), and automatic teardown to prevent resource leaks. The library is actively maintained within the `constructive-io` ecosystem and is designed to be compatible with popular asynchronous test runners like Jest and Mocha, offering a reliable solution for fast and realistic database integration tests.","language":"javascript","status":"active","version":"4.9.1","tags":["javascript","postgres","postgresql","testing","integration-tests","database-testing","pg","rls","role-based-access","typescript"],"install":[{"cmd":"npm install pgsql-test","imports":["import { getConnections } from 'pgsql-test';","import { seed } from 'pgsql-test';","import { setContext } from 'pgsql-test';"]},{"cmd":"yarn add pgsql-test","imports":[]},{"cmd":"pnpm add pgsql-test","imports":[]}],"homepage":"https://constructive-io.github.io/pgsql-test","github":"https://github.com/constructive-io/constructive","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/pgsql-test","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":{"summary":{"python_range":"18–22","success_rate":0,"avg_install_s":null,"avg_import_s":null,"wheel_type":null},"url":"https://checklist.day/v1/registry/pgsql-test/compatibility"},"provenance":{"verified_status":null,"verified_at":null,"last_verified":"Wed Jun 17","next_check":"Sat Jul 18","install_tag":null}}