Tiny Fixtures
JSON →`tiny-fixtures` is a lightweight JavaScript/TypeScript library designed to simplify the creation and management of database fixtures specifically for testing environments. Currently at version 0.3.0, it is built to integrate with PostgreSQL databases, relying on `node-postgres` connection pools for its operations. The package's primary export is the `tinyFixtures` function, which, when initialized with a database pool, returns a `createFixtures` function. This function facilitates the generation of `setup` and `teardown` routines for specified tables and data arrays. A key differentiator is its robust handling of foreign key relationships, allowing testers to reference IDs of newly inserted parent records when creating child fixtures. The library aims to provide clean, isolated test data for each test run while importantly preserving existing data in development databases, thereby enhancing the local development workflow. It maintains a 'tiny' footprint by emphasizing explicit control over fixture ordering, particularly for relational data.
Traffic · last 30 days ↓75% vs prev 7d
top countries 🇺🇸 United States · 🇪🇸 Spain · 🇫🇷 France · 🇩🇪 Germany · 🇨🇦 Canada