Testing

Testing

Verify correctness early, often, and automatically

Enforceable guidelines from our catalog

Unit Tests Must Cover Core Business Logic

All core business logic functions and methods must have comprehensive unit tests using Jest, Mocha, or similar testing frameworks with at least 80% code coverage for critical paths.

Integration Tests Must Verify Component Interactions

Integration tests must verify that components, services, and external systems work correctly together using test databases, mock services, or test containers to simulate real environments.

Mocking Must Be Used to Isolate Units Under Test

Unit tests must use mocking libraries like Jest mocks, Sinon, or custom mocks to isolate the unit under test from external dependencies and enable focused testing of specific functionality.

Sign up for free
and get unlimited access to our guidelines catalog