Skip to content

cjohansen.no

Live coding help from Git and Emacs

A small git script and two lisp functions can go a long way in helping you "live code" in a prepared and controlled matter at conferences.

Full article Live coding help from Git and Emacs.

Sinon.JS 0.6.0 - Fake XMLHttpRequest and improved test framework integration

Sinon.JS 0.6.0 is out and it features a new FakeXMLHttpRequest object and a high-level interface for testing xhr-dependent code along with improvements to sinon.sandbox and sinon.test.

Full article Sinon.JS 0.6.0 - Fake XMLHttpRequest and improved test framework integration.

Sinon.JS 0.5.0 Released

I've been holding off releasing Sinon until it's "done". Luckily, @augustl kicked me for not "releasing early, releasing often", so I got my act together.

Full article Sinon.JS 0.5.0 Released.

Faking Timers and Dates with Sinon

In addition to low-level tools for stubbing and mocking and high-level tools to integrate with test runners, Sinon provides a few useful utilities. This post explains the first of these, which is fake timers and Dates.

Full article Faking Timers and Dates with Sinon.

Stepping Through JsTestDriver Tests

Sometimes it's useful to split largish JsTestDriver test suites into smaller chunks for debugging, or for slower runs. Here's a quickie little script I wrote to do just that.

Full article Stepping Through JsTestDriver Tests.

Higer-level Stubbing and Mocking Tools in Sinon

Having covered the basic Sinon interface in one and a half posts I want to show you some of the higher-level tools Sinon brings to the table to reduce the amount of ceremony required to add stubs and mocks to your JavaScript tests. Hopefully, these tools will make it dead simple to properly integrate Sinon with any xUnit style test framework.

Full article Higer-level Stubbing and Mocking Tools in Sinon.

Test Spies, Stubs and Mocks - Part 1.5

While presenting the core Sinon interface yesterday i unintentionally left out parts of the API. To make up for the mistake, here are the missing pieces.

Full article Test Spies, Stubs and Mocks - Part 1.5.

JavaScript Test Spies, Stubs and Mocks

One of the things coming out of me recently writing a book (apart from, you know, a book) is a JavaScript stubbing and mocking library (still in the making) called Sinon. This is the first of a total of three posts giving a preview on the API. Hopefully some of you want to share your ideas and feedback on it.

Full article JavaScript Test Spies, Stubs and Mocks.

Update on the node.js asserts

I realized that if you want the assert-extras assertions, you probably want the built-in assertions as well.

Full article Update on the node.js asserts.

Unit testing node.js apps

Recently I've been dabbling in the fantastic library that is node.js. Whenever I enter a new development environment I immediately poke around to figure out how to unit test things. I'm uncomfortable writing too much code without tests, especially when I'm on unfamiliar grounds. Here's what I landed on in round one.

Full article Unit testing node.js apps.

About cjohansen.no

Personal blog of Christian Johansen, on test driven development, open source, emacs and more.

Latest comments

  1. Christian and Clotho on Sinon.JS 0...
  2. Christian and Matthew on Sinon.JS...
  3. Christian and Andrew on Test Spies...
  4. Christian and August on Faking Tim...
  5. Christian and Andrew on Higer-leve...

2006 - 2010 Christian Johansen Creative Commons License