~/talk

Maintainable Tests while maintaining Sanity

Talkat EnterpriseNG 2021 · 2021-12-02..12-03· [testing, angular]
slides:none on file

Concrete recipe for getting broken specs green: configure TestBed from zero to hero by declaring the component, mocking dependencies in providers, and mocking child components instead of using NO_ERRORS_SCHEMA is an anti-pattern. Use ng-mocks (mockProvider/mockDeclaration), overrideComponent to replace component-scoped providers, and use rxjs.empty for observable properties. Workflow aims for an 80/20/10 split—80% happy path fixes, 20% harder overrides, 10% design changes for long-term testability.

AI-written summary · about

  1. 0:00Introduction
  2. 2:06About me
  3. 7:44Emergency
  4. 9:57Mocking
  5. 11:35Problems
  6. 13:32General advice
  7. 15:11Empty as mock
  8. 17:31Antipattern
  9. 19:22Resources
~/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.