PanelChristian Johansen (twitter github blog) Joe Eames (twitter github blog) Merrick Christensen (twitter github) Jamison Dance (twitter github blog)
Discussion
\xa000:45 - Christian JohansenTest-Driven JavaScript Development
Sinon.JS
\xa0Gitorious01:26 - Sinon.JS02:22 - Stubs, Mocks and SpiesMocks Aren\u2019t Stubs: Martin Fowler
\xa0Mocha10:47 - History of Sinon.JS12:25 - XHR, HML, HTTP13:36 - Mocking the ClockSet Time Out
17:22 - Test-Driven JavaScript DevelopmentAndrea Giammarchi @WebReflection The Pragmatic Bookshelf Screencasts
21:43 - Test FrameworkBuster.JS
\xa0js-test-driver24:17 - Other Mocking Librariesmockjax
26:24 - Mocking Properties27:22 - Matchers30:46 - Sinon.JS Gotchas33:10 - State of Test-Driven Development in JavaScriptStrategies for Testing
PicksJack Reacher (Joe) Torchlight II (Joe) Effective JavaScript by David Herman (Merrick) Rdio (Merrick) Adventure Time (Jamison) How to implement an algorithm from a scientific paper: Emmanuel Goossaert (Jamison) Advanced Vim registers (Jamison) Emacs Rocks! (Christian) Simple Made Easy (Christian) LEGO Lord of the Rings (Christian) Testing Clientside JavaScript (Joe)
Transcript
\xa0MERRICK:\xa0 Classy guy.[Hosting and bandwidth provided by the Blue Box Group. Check them out at Bluebox.net.][This episode is sponsored by Component One, makers of Wijmo. If you need stunning UI elements or awesome graphs and charts, then go to Wijmo.com and check them out.]JAMISON:\xa0 Hello friends. Welcome to JavaScript Jabber. This is Episode number 43. Today, we have Joe Eames.JOE:\xa0 Howdy!JAMISON:\xa0 Merrick Christensen.MERRICK:\xa0 Hey guys!JAMISON:\xa0 And Christian Johansen. And also me, Jamison Dance. But Christian is the special guest today. Do you want to talk a little bit about yourself? Introduce yourself for those of us that don\u2019t know you?CHRISTIAN:\xa0 Yeah, sure. First of all, hi! I'm in Oslo, Norway up in the cold north. So, I wrote a book about testing JavaScript a couple of years back called \u2018Test-Driven JavaScript Development\u2019. And I've done a few open source libraries. Perhaps the one that most people know about is Sinon.JS. And currently, I work at Gitorious.org. So, that\u2019s the brief introduction about me, I guess.JAMISON:\xa0 Great! Chuck is gone today. He\u2019s at CES, I believe. So, that\u2019s why I'm filling in for him. I think we want to talk mainly about Sinon.JS today. Do you want to just give an overview of it?CHRISTIAN:\xa0 Sure.JAMISON:\xa0 For those who have never heard of Sinon.JS, what is it?CHRISTIAN:\xa0 Sinon.JS is a stubbing and mocking library which means that when you're writing automated tests for your JavaScript, Sinon provides a tool kit to help you test functions and callbacks and stuff like that, to track how they're being used throughout the system. And then, it also provides some utilities to test asynchronous stuff through timers, like Set Time Out and Set Interval and those kinds of things.And it also has a fake XMLHttpRequest implementation. So, it allows you to test your client side JavaScript completely decoupled from the server and it gives you an API to mimic the role of the server in your tests. So, you can focus a test on how the client side reacts to various kind of behavior from the server.JAMISON:\xa0 So, you talked about stubbing and mocking. And I think, that means we have to get into the hairy discussion of the difference between stubs and mocks?MERRICK:\xa0 And spies.JAMISON:\xa0 And spies, yeah. Do you want to explain that a little bit?CHRISTIAN:\xa0 Sure. I can explain my take on it because I know there are more than just mine.MERRICK:\xa0 Sure.CHRISTIAN:\xa0 I'm using the terminology pretty much like Martin Fowler did and he has a famous article called \u2018Spies are Not Mocks\u2019 or something like that. So,Special Guest: Christian Johansen .
Support this podcast at \u2014 https://redcircle.com/javascript-jabber/donations
Privacy & Opt-Out: https://redcircle.com/privacy
Become a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.