Angular + Jest: Testing Titbits
summary
Concrete recipes for Angular + Jest unit testing: shows how to spy on named imports to test pure functions, how to cast overload to a specific function type to stub an overloaded pipe, and how to use HttpTestingController with flush and HTTP error responses to verify error handling. Demonstrates async control with fakeAsync/tick and when to subscribe, recommends pragmatic mocking (avoid over‑mocking), and shows nx test/watch commands to run or focus tests.
AI-written summary · about
chapters (11)
- 0:00Start
- 1:44Why You Need Testing
- 2:57Why Testing
- 4:42General Testing Strategy
- 5:41Unit Tests
- 10:16Generous Interface Testing
- 14:05Expectations
- 16:10Common Scenarios
- 16:54Test Child Components with Inputs
- 17:42Testing Http Request
- 21:56Test Execution
related talks
59mTechniques and practices for testing Angular 2
19mModern Testing Strategies for Reactive Applications
19mTesting Best Practices for Angular Applications
56mAngular Unit Testing from the Trenches
56mTechniques and practices for testing Angular
52mAngular Testing: Do I Really Have to Do It?!
45mReactive Testing Strategies with NgRx
27mUnit Tests for Angular 2 Applications
