Prepares the testing environment for mocha/chai/sinon.

Needs fix so it works with RequireJS.