JavaScript Jabber

043 JSJ Sinon.JS


Listen Later

PanelChristian Johansen (twitter github blog) Joe Eames (twitter github blog) Merrick Christensen (twitter github) Jamison Dance (twitter github blog)
Discussion
 00:45 - Christian JohansenTest-Driven JavaScript Development
Sinon.JS
 Gitorious01:26 - Sinon.JS02:22 - Stubs, Mocks and SpiesMocks Aren’t Stubs: Martin Fowler
 Mocha10: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
 js-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
 MERRICK:  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:  Hello friends. Welcome to JavaScript Jabber. This is Episode number 43. Today, we have Joe Eames.JOE:  Howdy!JAMISON:  Merrick Christensen.MERRICK:  Hey guys!JAMISON:  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’t know you?CHRISTIAN:  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 ‘Test-Driven JavaScript Development’. 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’s the brief introduction about me, I guess.JAMISON:  Great! Chuck is gone today. He’s at CES, I believe. So, that’s 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:  Sure.JAMISON:  For those who have never heard of Sinon.JS, what is it?CHRISTIAN:  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:  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:  And spies.JAMISON:  And spies, yeah. Do you want to explain that a little bit?CHRISTIAN:  Sure. I can explain my take on it because I know there are more than just mine.MERRICK:  Sure.CHRISTIAN:  I'm using the terminology pretty much like Martin Fowler did and he has a famous article called ‘Spies are Not Mocks’ or something like that. So,Special Guest: Christian Johansen .

Support this podcast at — 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.
...more
View all episodesView all episodes
Download on the App Store

JavaScript JabberBy Charles M Wood

  • 4.4
  • 4.4
  • 4.4
  • 4.4
  • 4.4

4.4

234 ratings


More shows like JavaScript Jabber

View all
Freakonomics Radio by Freakonomics Radio + Stitcher

Freakonomics Radio

32,246 Listeners

The Tim Ferriss Show by Tim Ferriss: Bestselling Author, Human Guinea Pig

The Tim Ferriss Show

16,174 Listeners

The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

288 Listeners

Ruby Rogues by Charles M Wood

Ruby Rogues

45 Listeners

The Freelancers' Show by Charles M Wood

The Freelancers' Show

23 Listeners

The a16z Show by Andreessen Horowitz

The a16z Show

1,105 Listeners

Software Engineering Daily by Software Engineering Daily

Software Engineering Daily

626 Listeners

Talk Python To Me by Michael Kennedy

Talk Python To Me

583 Listeners

iPhreaks by Charles M Wood

iPhreaks

17 Listeners

React Native Radio by Jamon Holmgren, Robin Heinze, Mazen Chami

React Native Radio

67 Listeners

Adventures in Angular by Charles M Wood

Adventures in Angular

15 Listeners

JavaScript Jabber by Charles M Wood

JavaScript Jabber

62 Listeners

Ruby Rogues by Charles M Wood

Ruby Rogues

21 Listeners

My JavaScript Story by Charles M Wood

My JavaScript Story

4 Listeners

My Ruby Story by Charles M Wood

My Ruby Story

0 Listeners

Syntax - Tasty Web Development Treats by Wes Bos & Scott Tolinski - Full Stack JavaScript Web Developers

Syntax - Tasty Web Development Treats

985 Listeners

The Indicator from Planet Money by NPR

The Indicator from Planet Money

9,556 Listeners

Tech Brew Ride Home by Morning Brew

Tech Brew Ride Home

964 Listeners

All-In with Chamath, Jason, Sacks & Friedberg by All-In Podcast, LLC

All-In with Chamath, Jason, Sacks & Friedberg

10,254 Listeners

Deep Questions with Cal Newport by Cal Newport

Deep Questions with Cal Newport

1,348 Listeners

Dwarkesh Podcast by Dwarkesh Patel

Dwarkesh Podcast

551 Listeners

Latent Space: The AI Engineer Podcast by Latent.Space

Latent Space: The AI Engineer Podcast

101 Listeners

BG2Pod with Brad Gerstner and Bill Gurley by BG2Pod

BG2Pod with Brad Gerstner and Bill Gurley

475 Listeners

AI + a16z by a16z

AI + a16z

34 Listeners