Skip to content

cjohansen.no

Test driven development

Test Driven JavaScript - The Book

For those of you who didn't already know: I'm writing a book. It's about JavaScript, it's about unit testing and it's about Test Driven Development. It won't be out until October this year, but drafts are already available through Safari Rough Cut.

Full article Test Driven JavaScript - The Book.

Jstdutil - A Ruby wrapper over JsTestDriver

Today I needed remote access to a gem I've been tinkering with for a while, so I pushed it to Gemcutter. It's called jstdutil, and it provides a small Ruby wrapper over JsTestDriver that adds colored output, a short, snappy `jstestdriver` command and autotest.

Full article Jstdutil - A Ruby wrapper over JsTestDriver.

Test driven JavaScript done right

Since this summer, I've been test driving all my JavaScript code using Google's fairly fresh JsTestDriver project. If you're intrigued by TDD with JavaScript, including automatic testing (in a console, or - if you're a masochist - an IDE), test suites of 300+ tests running in 498ms as well as shiny red and green output, you should read on.

Full article Test driven JavaScript done right.

Slides from my JavaScript TDD presentation

Last night I gave a presentation to the local Ruby user group in Oslo on tools for supporting test driven development in JavaScript.

Full article Slides from my JavaScript TDD presentation.

Syntactical sugar for your JavaScript unit tests

After switching my Ruby tests from vanilla Test::Unit to Shoulda (via Jeremy McAnally's Context) a while back I've gotten quite used to sexy unit tests. Coming back to JsUnitTest for JavaScript last night, I realized the syntac wasn't working for me anymore. So today, I fixed it.

Full article Syntactical sugar for your JavaScript unit tests.

Pimp my development environment!

Over the past few days I've been adding some bits and pieces that has really pimped by development environment into a slightly more productive one, and certainly a more enjoyable one.

Full article Pimp my development environment!.

TDD/JavaScript: $()

Most modern JavaScript libraries offer some kind of "dollar sign function". As another applied example of test driven development in JavaScript I'll walk you through developing your own dollar sign function.

Full article TDD/JavaScript: $().

A test driven example

With my two introductory posts on JavaScript testing under the belt, it's time to do some actual testing. In todays post I walk you through a pretty simple example in test driven development with JavaScript, coding a trim() function. The end result is presented with Qunit, jsunittest.js and YUI Test.

Full article A test driven example.

Test driven development with JavaScript, part two

It's been a while since part one, but I guess late is better than never. In this second part I'll walk you through some available testing frameworks for JavaScript.

Full article Test driven development with JavaScript, part two.

Test driven development with JavaScript

In a series of three articles I am going to walk you through the what's and why's of unit testing and test driven development focusing on JavaScript. We'll look into the underlying concepts, available frameworks for JavaScript, and of course a practical example to top it all off.

Full article Test driven development with JavaScript.

2006 - 2010 Christian Johansen Creative Commons License