~/talk

Testing Best Practices for Angular Applications

Talkat NGConf 2018 · on Wednesday, 2018-04-18· [angular, testing]
name:Yi Qi
github:TinyBookE
slides:none on file

Shows concrete recipes and working demos: majority of checks stay as fast unit tests; use async/await for Promise-based flows, fakeAsync + tick for precise timer control (500ms debounce demo), and HttpTestingController to intercept and verify XHRs with mock responses; Angular CLI scaffolds tests and Karma runs them; Protractor requires disabling the old control flow and using async/await; future notes include AOT/LT tests and component harnesses for faster, production‑closer suites.

AI-written summary · about

  1. 0:00Intro
  2. 0:18Why do we write tests?
  3. 1:19Testing in Angular
  4. 2:02Testing using Angular CLI
  5. 2:42Asynchronous Tests
  6. 3:38Demo: Delayed Echo Server
  7. 4:07Let's start to test
  8. 5:36Problem with Jasmine done
  9. 6:09Jasmine done fail
  10. 6:42async helper
  11. 7:13Problem: Long promise chains
  12. 8:35Timer
  13. 9:05Demo: Debounced Echo Server
  14. 9:34How to test that?
  15. 10:30Test Demo
  16. 11:54XHR(HttpClient)
  17. 12:38Demo: XHR Echo Server
  18. 13:01Http Testing Controller
  19. 14:18Summary
  20. 14:36More about unit test
  21. 15:11Async in Protractor
  22. 16:41Disable control flow
  23. 16:51Use async/await in test
  24. 17:24AOT Test
  25. 17:57Component harness
  26. 18:23To Summarize...
~/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.