TypeORM Test Transactions

JSON →
library 3.6.1 ·javascript
verified May 27, 2026

typeorm-test-transactions is a utility library (current stable version 3.6.1) designed to facilitate isolated, concurrent testing for applications using TypeORM. It wraps individual tests in database transactions, ensuring that any data modifications made during a test are automatically rolled back upon completion. This approach prevents test data contamination, allowing tests to run in parallel directly against the database without requiring complex `WHERE` clauses or entity tracking to filter out artifacts from other tests. The library leverages `typeorm-transactional-cls-hooked` for its core transactional capabilities and supports various database versions including MySQL (5.7, 8.0), MariaDB 10, and Postgres (9-13). It differentiates itself from mocking strategies by enabling direct database interaction, crucial for testing database constraints and their impact on application logic.

total hits 16
actors 6 distinct systems
last hit 1d ago human
GPTBot
5
MetaBot
4
Script
1
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇫🇷 France · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇮 Finland