Code based on Testing in Node.js by Gabriel Manricks (Nettuts+)