Skip to content

Welcome to Spectator

A Powerful Tool to Simplify Your Angular Tests

Spectator helps you get rid of all the boilerplate grunt work, leaving you with readable, sleek and streamlined unit tests. Write tests for components, directives, services, and more, without having to learn TestBed, ComponentFixture, and DebugElement APIs.

  • Clean and Easy tests: Get rid of boilerplate and write sleek unit tests.
  • Easy DOM querying: Query the DOM easily without complex API calls.
  • Keyboard/mouse/touch events: Dispatch events seamlessly.
  • Testing projection: Built-in support for testing content projection.
  • Custom Matchers: Use helpful custom matchers like toHaveClass and toBeDisabled.
  • Routing testing support: Test your routing configurations easily.
  • HTTP testing support: Robust HTTP testing utilities out of the box.
  • Built-in support for entry components: Seamlessly test dynamically loaded components.
  • Auto-mocking providers: Automatically mock your dependencies.
  • Strongly typed: Enjoy full TypeScript support and type safety.