Mock TypeORM

JSON →
library 1.0.4 ·javascript
verified May 27, 2026

Mock TypeORM is a TypeScript-first library designed to facilitate unit and integration testing of TypeORM-based applications by preventing actual database interactions. It is currently at version 1.0.4 and appears to be actively maintained, indicated by recent GitHub activity and a workflow badge. The package differentiates itself by utilizing Sinon.js for mocking, which makes it compatible with a wide range of Node.js testing frameworks such as Jest, Mocha, and Vitest, offering flexibility that some other mocking approaches (e.g., Jest-specific mocks) might lack. It provides a straightforward API to mock TypeORM's `DataSource`, `EntityManager`, `Transaction`, `QueryBuilder`, and `Repository` methods, enabling developers to control database responses programmatically without needing a real database connection. This approach significantly speeds up tests and makes them more deterministic and isolated, avoiding the complexities and flakiness associated with test databases.

total hits 16
actors 7 distinct systems
last hit 1d ago human
MetaBot
4
GPTBot
2
Script
1
ClaudeBot
1
Search engines
1
Humans
2

top countries 🇺🇸 United States · 🇨🇦 Canada · 🇳🇴 Norway · 🇫🇷 France · 🇪🇸 Spain