Zoneless Testing
summary
Angular moves zoneless and that breaks Zone.js‑dependent testing: fakeAsync and waitForAsync stop working. Concrete alternatives: use ComponentFixture::whenStable() for promises, register Angular’s pending tasks API (developer preview in v19) to make setTimeouts observable, or rely on testing‑framework fake timers (Jasmine/ vitest/Jest PRs in flight) or run Cypress component tests. Demo uses Rx Resource, router testing harness and showed changes work but timeouts require app changes or timer fakes.
AI-written summary · about
chapters (15)
- 0:00Zoneless testing intro
- 1:02Why zoneless matters now
- 2:24How zoneless changes detection
- 5:52Testing basics with zoneless
- 7:17Real-world test case setup
- 10:11Using fixtures effectively
- 13:44Testing disabled state changes
- 14:46Handling async delays
- 16:10End of fakeAsync/waitForAsync
- 17:13Pending tasks for async control
- 19:46Challenges with pending tasks
- 21:09Alternatives to pending tasks
- 22:56Future of async testing
- 23:59Cypress component testing
- 24:42Key takeaways
related talks
30mNo Zone, No Problem - Building Angular Apps without Zone.js
19mTesting Best Practices for Angular Applications
19mModern Testing Strategies for Reactive Applications
59mTechniques and practices for testing Angular 2
33mMonitor the Angular application with Zone
27mUnit Tests for Angular 2 Applications
37mGet ready to go Zoneless
23mPartially Zoneless Performance tuning without big bang refactoring
