From http://bulkan-evcimen.com/testing_with_mocha_sinon