~/talk

Angular Component Test Harnesses FTW

Talkat DevReach 2022 · 2022-09-11..09-14· [angular, testing]
links:none on file
slides:none on file

Shows that replacing DOM queries and manual change detection with Angular Material component harnesses and the TestbedHarnessEnvironment.loader cuts test code dramatically, removes brittle selector logic, and auto-handles async change detection. Demonstrates the CDK testing API, harness.get / getAll / with filters, and building a custom component harness (add-comment) plus a test-host to validate the harness. Resulting tests are shorter, easier to read, and more resilient — the harness approach works and lowers maintenance.

AI-written summary · about

  1. 0:00Angular component testing intro
  2. 2:12What are test harnesses
  3. 5:43Tests with vs without harnesses
  4. 10:39How harnesses work
  5. 18:03Custom test harnesses
  6. 26:17Winning with harnesses
  7. 27:00Q&A
~/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.