Category Archives: MochaJS

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, Jasmine, Javascript, 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 Jasmine, Javascript, Productivity, Test Automation, Unit Testing, WinJS | 3 Comments

Asynchronous Unit Tests With Mocha, Promises, And WinJS

Before I get in to the guts of this post, you need to read Christopher Bennage’s post on how we have our Mocha test suite set up for our Win8 / WinJS project. It’s not the best setup, but it … Continue reading 

Also posted in Async, ChaiJS, CommonJS, Javascript, Testing, WinJS | 11 Comments