Spectator

screenshot of Spectator
angular

A Powerful Tool to Simplify Your Angular Tests

Overview

Spectator is a powerful tool designed to simplify Angular tests by eliminating boilerplate grunt work, resulting in more readable, sleek, and streamlined unit tests. It offers a wide range of features to support testing Angular components, directives, services, as well as other functionalities like DOM querying, event triggering, routing testing, HTTP testing, and more.

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, etc.)
  • 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

angular
Angular

Angular is a TypeScript-based open-source framework by Google for building dynamic single-page applications and cross-platform mobile apps with MVC architecture and a rich set of features.

eslint
Eslint

ESLint is a linter for JavaScript that analyzes code to detect and report on potential problems and errors, as well as enforce consistent code style and best practices, helping developers to write cleaner, more maintainable code.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.