~/talk

Testing that the code does what the code does

Talkat NE-RPC Back 2 Sk00l 2020 · 2020-09-22..09-24· [testing, developer-experience]
links:none on file
slides:none on file

Argues tests must target observable behavior not implementation details, showing concrete patterns: use red-green-refactor loops, Jest describe blocks for nested behaviors, and double‑loop TDD for acceptance-first drives. Recommends test doubles (H2 as a fake, stubs, spies, mocks) and an adapter layer plus Pact for third‑party contracts. Demonstrates refactors: turn getters/setters into domain types (postcode example), apply Tell‑Don’t‑Ask and Law of Demeter to reduce fragile setup and noisy test failures.

AI-written summary · about

  1. 0:00Introduction and context
  2. 2:11Why we write automated tests
  3. 5:20Testing behavior not implementation
  4. 10:38Structuring tests for clarity
  5. 13:09Red-green-refactor loop explained
  6. 16:00Defining units of behavior
  7. 17:44Test doubles and their uses
  8. 19:31Classical vs London school testing
  9. 23:02Avoiding backdoor test setup
  10. 24:45Adapting third-party dependencies
  11. 26:30Fragile tests signal design issues
  12. 27:11Leaking state and behavior
  13. 29:18Primitive obsession and types
  14. 31:02Test-induced design damage
  15. 33:31Mocking roles not objects
  16. 35:18Law of Demeter and tell-don't-ask
  17. 38:06Effective mocking strategies
  18. 39:30Key principles and summary
~/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.