~/talk

Testing Without Mocks

Talkat Craft Conference 2024 · 2024-05-30..05-31· [testing, developer-experience]
slides:none on file

Argues that replacing mocks with Nullables — production classes with an encapsulated off switch and a createNull factory — lets tests run the exact same code as production while stubbing only third‑party calls. Shows a homepage controller tested with a nulled Route13 client and nulled HTTP client, demos passing tests that run ~50 ms, keeps just three or four smoke tests, and claims faster, deterministic, refactor‑friendly suites at the cost of adding a createNull factory to IO classes.

AI-written summary · about

  1. 0:00Testing without mocks
  2. 2:33Problems with traditional tests
  3. 9:22Nullables pattern
  4. 16:29Live coding demo
  5. 36:13Refactoring tests
  6. 45:43Conclusion
~/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.