Search

#### Docs

- Guide
  - Overview
  - Setup
  - Learning Angular
  - Architecture
  - Displaying Data
  - User Input
  - Forms
  - Dependency Injection
  - Template Syntax
- Tutorial
  - Introduction
  - 0. The Starter App
  - 1. The Hero Editor
  - 2. Master/Detail
  - 3. Multiple Components
  - 4. Services
  - 5. Routing
  - 6. HTTP
- Advanced
  - Attribute Directives
  - Component Styles
  - Deployment
  - Hierarchical Injectors
  - HTTP Client
  - Lifecycle Hooks
  - Pipes
  - Router
  - Security
  - Structural Directives
  - Testing

#### Components

- Components Gallery

#### Resources

- Cheat Sheet
- Glossary
- FAQ
- Tools
- Community and Support

#### Reference

- Videos
- API Documentation

new_releases We're currently in the progress of migrating this site from Angular version 5.3.1 to 7.0.0. Package versions might be out-of-date or inconsistent! Visit the repo for more info.

# Component Testing (DRAFT) 6.0

If you notice any issues with this page, please report them.

This part of the Testing how-to guide covers component testing of AngularDart apps using the following packages:

package:test
  Dart’s standard testing package, which is similar to most unit testing frameworks, including Jasmine for JavaScript. If you’ve used a modern testing framework before, then writing tests using `package:test` will have a familiar feel. Testing basics is covered in Writing component tests: Basics. For in-depth coverage of the package capabilities, see the `package:test` documentation.
package:angular_test
  A complementary package that provides a means of interacting with Angular components created as test fixtures.
package:mockito
  A library for creating mock objects. Not all component tests require mock objects, but in later sections, you’ll learn the fundamentals of using `package:mockito` as needed. For further details, see the package documentation.

## Scope

The angular_test package is suitable for testing either a single component, or a small group of related components. This package is not meant to test an entire app. For that, you need to write end-to-end tests.

## Topics

This guide covers the following component testing topics: