function startTests(singleRun, done) {
    karma.start({
        configFile: __dirname + '/karma.conf.js',
        singleRun: !!singleRun
    }, karmaCompleted);

    ////////////////

    function karmaCompleted(exitCode) {
        if (exitCode === 0) {
            done();
        } else {
            process.exit(exitCode);
        }
    }
}
Start the tests using karma.
@param  {boolean} singleRun - True means run once and end (CI), or keep running (dev)
@param  {Function} done - Callback to fire when karma is done
@return {undefined}