Angular Testing

Eugen Istoc

Game Plan

Types of Testing

Testing?

AngularJS

Tooling

...profit?

Why is testing important?

...because of reasons.

Benefits of writing unit tests.

  • Prevent breaking changes
  • Helps manage code better
  • Planning and predictability
  • Reduce overall development costs
  • ... many other benefits (TDD?, BDD?)

Types of tests

Unit Testing

  • Code-level
  • Sandboxed and isolatet
  • Fast

E2E Testing

  • Web-level
  • Requires its own server
  • Best for testing integrations between components

Testing In Angular

Setting up Karma

Mocking Service

Mocking Service

Mocking Service

Testing Directive

Testing Filters

Exercise

Advanced

  • Spys
  • Mocking services
  • Debugging tests
  • Tooling

More Information

Angular Testing

By genuchelu

Angular Testing

  • 391