Category Archives: Jasmine

JavaScript Unit Tests: Jasmine vs Mocha

Someone recently asked me whether I prefer Jasmine or Mocha for unit testing JavaScript. My answer is: Jasmine and Mocha are both great. I use both, depending on the project and team. There’s a great community around both, and you’ll … Continue reading 

Also posted in ChaiJS, Javascript, MochaJS, Testing, Unit Testing | 7 Comments

A WinJS SpecRunner: Automating Script Tag Insertion For Unit Tests

Writing unit tests with Mocha or Jasmine is generally pretty easy. Once you have a test runner set up, it’s not much different than any other JavaScript environment, really. But the trick to this is getting a test runner set … Continue reading 

Also posted in Javascript, MochaJS, Productivity, Test Automation, Unit Testing, WinJS | 3 Comments

Jasmine.Async: Making Asynchronous Testing With Jasmine Suck Less

I love Jasmine. It’s a great BDD-style testing framework for browser based JavaScript, and my preferred tool for doing that kind of work. But the asynchronous testing story in Jasmine is painful at best. Jasmine’s Async Is Painful Here’s a short example of … Continue reading 

Also posted in Async, jasmine-async, Javascript, Unit Testing | 26 Comments

I’m Wring A Book On Building Backbone Plugins

A few weeks ago I published a screencast on building Backbone plugins (paid). In this screencast, I walk and talk through the steps that I take to build, test, package and deploy some of the plugins and projects that I build … Continue reading 

Also posted in Backbone, Books, WatchMeCode | 8 Comments

Jasmine-BDD: A Screencast On The Standalone Test Runner

My 2nd screencast at is now online, and is free! WatchMeCode Episode 2: The Jasmine Standalone Runner In this episode, I cover the basics of JavaScript testing with the Jasmine-BDD test framework, showing how to install and use the … Continue reading 

Also posted in Javascript, Testing | 2 Comments

Quick Hack To Work Around Jasmine-jQuery Fixture Limitations

I use Jasmine-jQuery to help out my Jasmine tests. It’s a great little plugin and generally makes my life easier. I ran into an issue today, though, and rather than trying to fix the real problem (which I think is … Continue reading 

Also posted in Javascript | 1 Comment