~/talk

JavaScript Tests in Node, the Browser, and CI

slides:none on file

Builds a repo with a start and done folder and runs specific examples: mocha + chai for assertions, tests that cover synchronous code, callbacks, promises and async/await, and a monkey‑patched jQuery ajax to test DOM code. Uses karma with headless Chrome and Firefox to run browser tests in CI via npm test, demonstrates debugging breakpoints, and finds/fixes a divide‑by‑zero bug. Ends with automated single‑run CI and passing cross‑browser test runs (local counts: ~9 then ~18 tests).

AI-written summary · about

  1. 0:00Introduction
  2. 2:32First test in Node
  3. 10:09Testing async callbacks
  4. 15:34Testing promises
  5. 18:53Async/await tests
  6. 20:17Testing edge cases
  7. 26:42Tests as documentation
  8. 28:06Testing in the browser
  9. 34:35Debugging browser tests
  10. 36:28Mocking jQuery AJAX
  11. 44:35Running tests in CI
  12. 52:30Summary and resources
~/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.