What problem does it solve?
It eliminates flaky, inconsistent tests by standardizing how RedisInsight teams write Jest and Testing Library tests for components and backend services, ensuring deterministic async behavior and maintainable setup.
Core Features & Use Cases
- Deterministic async testing: Prefer
waitFor/findBy* and waitForElementToBeRemoved instead of fixed timeouts.
- Consistent test setup with
renderComponent: Centralize providers/router/theme setup and use shared default props across component tests.
- High-quality test data: Use
@faker-js/faker (and Fishery for backend factories) to generate realistic, varied inputs instead of hardcoded values.
- Mocking patterns with MSW: Mock API calls with Mock Service Worker for realistic request/response behavior.
- Scope: Use these standards when creating or editing any
*.spec.ts / *.spec.tsx, slice tests, service/controller tests, and critical end-to-end flows (including Playwright).
Quick Start
When adding or updating a test file, write it using the AAA pattern and replace any fixed waits with waitFor so assertions only run after the expected UI or async state is reached.