pgsql-test-helpers

Installation
SKILL.md

Creating reusable test helper functions and constants for consistent, maintainable database tests.

Overview

As test suites grow, common patterns emerge: creating users, setting up contexts, querying specific tables. Extracting these into helper functions improves readability, reduces duplication, and makes tests more maintainable.

Predefined Constants

Test User IDs

Use predefined UUIDs for test users to ensure consistency across tests:

export const TEST_USER_IDS = {
  USER_1: '00000000-0000-0000-0000-000000000001',
  USER_2: '00000000-0000-0000-0000-000000000002',
  USER_3: '00000000-0000-0000-0000-000000000003',
  ADMIN: '00000000-0000-0000-0000-000000000099',
} as const;
Related skills

More from constructive-io/constructive-skills

Installs
3
First Seen
Feb 27, 2026