Angular Testing: Do I Really Have to Do It?!
summary
A pragmatic walkthrough of Angular testing using Karma, Jasmine and Protractor: a demo project shows running ng test with over 90 unit specs, covers building stubs and spies, using TestBed and fixture.detectChanges to exercise templates and DI, and handling async with fakeAsync/tick. It highlights common pitfalls (e.g. forgetting done leading to false green tests), advises keeping dependencies minimal and using controlled environments, and shows integrating coverage into CI so the test suite runs green after fixes.
AI-written summary · about
chapters (16)
- 0:00Angular testing necessity
- 1:53Jasmine and Karma intro
- 3:16Test doubles: stubs, spies, mocks
- 7:17Effective test strategies
- 9:04Angular Testing Utilities basics
- 12:15Unit test with Jasmine
- 15:44Handling async in tests
- 21:44Testing services and pipes
- 24:53Component testing with TestBed
- 33:43Change detection in tests
- 36:57Testing components with dependencies
- 41:12Advanced async tests
- 46:17Configuring external modules
- 47:22Testing inputs/outputs
- 48:25Code coverage tools
- 49:49CI/CD test integration
related talks
59mTechniques and practices for testing Angular 2
56mAngular Unit Testing from the Trenches
56mTechniques and practices for testing Angular
19mTesting Best Practices for Angular Applications
32mTesting Angular apps
48mTest Driven Development with AngularJS
13mTesting Angular Components Fundamentals
25mAngular + Jest: Testing Titbits
