Guides
Learn how to test a class, control its dependencies, and verify interactions between collaborators. Start with the fundamentals or jump to the guide that matches your task.
Writing your first Suites test? Choose your framework in Quick Start for a complete NestJS, InversifyJS, or InjectionJS example with Jest or Vitest.
Understand the basics
- Unit Testing Fundamentals: Decide what to test and where to draw the boundary around a unit.
- Test Doubles: Understand mocks, stubs, and spies, and when to use each.
Write your tests
- Solitary Unit Tests: Test one class with all its dependencies mocked. Start here to learn the core TestBed workflow.
- Sociable Unit Tests: Test a class with selected real collaborators while keeping external dependencies mocked.
Explore further
- How Suites works: See how Suites discovers dependencies, creates mocks, and constructs the class under test.
For complete, runnable projects, browse the Suites Examples repository.