Installation

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.

Features

  • ✅ Support for testing Angular components, directives and services
  • ✅ Easy DOM querying
  • ✅ Clean API for triggering keyboard/mouse/touch events
  • ✅ Testing ng-content
  • ✅ Custom Jasmine/Jest Matchers (toHaveClass, toBeDisabled..)
  • ✅ Routing testing support
  • ✅ HTTP testing support
  • ✅ Built-in support for entry components
  • ✅ Built-in support for component providers
  • ✅ Auto-mocking providers
  • ✅ Strongly typed
  • ✅ Jest Support

NPM

npm install @ngneat/spectator --save-dev

Yarn

yarn add @ngneat/spectator --dev