~/talk

Trojan War: SinonJS

TalkinRussianat JavaScript fwdays'17 · on Saturday, 2017-04-22· [testing, javascript]
links:none on file
slides:none on file

Presents using SinonJS together with Mocha and Chai to improve test isolation by replacing brittle stubs and handling async returns and exceptions, offering spies, stubs, mocks and fakes with readable matchers. Demonstrates SinonJS sandbox (auto-restores per test), the fake server for HTTP testing, per-call parameter matchers, and describes migrating a large existing test suite (thousands of tests) to this stack while noting documentation issues and migration tradeoffs.

AI-written summary · about

  1. 0:00SinonJS intro
  2. 1:50Choosing SinonJS
  3. 5:03Test doubles in unit tests
  4. 8:38Proxy issues with SinonJS
  5. 12:23Dependency handling
  6. 17:03Sandboxes and isolation
  7. 19:49SinonJS drawbacks
  8. 23:31Stub, spy, mock basics
  9. 26:29Martin Fowler’s test doubles
  10. 31:30AAA pattern
  11. 33:21SinonJS vs others
  12. 37:08Why others failed
  13. 40:26Best practices for isolated tests
  14. 41:49Unit testing theory
  15. 43:14Q&A
~/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.