~/talk

How to Test Asynchronous Code

Talkat NodeConf 2011 · on Thursday, 2011-05-05· [testing]
slides:none on file

Argues that asynchronous code becomes testable by making logic no IO and injecting test doubles, with tools: node-fake for mocks and node-microtest to run each test in a fresh V8 context so tests cannot perform IO. Demonstrates a small cat program driven to passing, reports product: ~6,000 lines of code with ~12,000 test lines, processing terabytes in production, close to 99% coverage and fewer than ten user-facing bugs, and shows the approach actually works.

AI-written summary · about

  1. 0:00Start
  2. 8:26How to Test Asynchronous Code
  3. 9:14How to Microtest Node.js Code
  4. 9:50TDD
  5. 10:06Discipline
  6. 10:41Libraries
~/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.