~/talk

Angular + Jest: Testing Titbits

Talkat Reliable Web Summit 2021 · 2021-08-26..08-27· [angular, testing]
slides:none on file

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

  1. 0:00Start
  2. 1:44Why You Need Testing
  3. 2:57Why Testing
  4. 4:42General Testing Strategy
  5. 5:41Unit Tests
  6. 10:16Generous Interface Testing
  7. 14:05Expectations
  8. 16:10Common Scenarios
  9. 16:54Test Child Components with Inputs
  10. 17:42Testing Http Request
  11. 21:56Test Execution
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.