Testing Angular Components Fundamentals
summary
Covers specific setup and code: uses Jasmine, Karma and Angular CLI, and TypeScript; recommends three test types—isolated, shallow and integration—and gives concrete criteria for each; details TestBed usage with configureTestModule, createComponent and compileComponents, explains Fixture.detectChanges, async wrappers, fakeAsync and tick, and shows when to mock HTTP services; prefers unit tests where possible and prescribes teardown by nulling globals so tests reliably pass.
AI-written summary · about
chapters (19)
- 0:00Intro
- 0:34What you are going to learn?
- 1:15Tools of the Trade
- 1:45Jasmine
- 2:47Three types of component tests
- 3:31Shallow Tests
- 3:54Integration Tests
- 4:43import statements
- 5:02Test Bed
- 6:06ComponentFixture
- 7:17describe block
- 7:52Mocking services
- 8:39beforeEach statements
- 9:04Writing your tests
- 9:37fakeAsync and tick
- 10:09Destroy references
- 10:39Additional resources
- 11:04Coupon codes
- 11:37Contact me
related talks
59mTechniques and practices for testing Angular 2
27mUnit Tests for Angular 2 Applications
56mAngular Unit Testing from the Trenches
19mTesting Best Practices for Angular Applications
56mTechniques and practices for testing Angular
52mAngular Testing: Do I Really Have to Do It?!
32mTesting Angular apps
16mAngular components - unit testing
