phantom.injectJs('../../vendor/jasmine/lib/jasmine-core/jasmine.js'); var consoleFns = require('../../vendor/jasmine/lib/console/console.js'); var jasmine = jasmineRequire.core(jasmineRequire); consoleFns.console(consoleFns, jasmine); var globals = jasmineRequire.interface(jasmine, jasmine.getEnv()); for (var property in globals) this[property] = globals[property]; jasmine.getEnv().addReporter(new jasmine.ConsoleReporter({ print: function print(msg) { console.log(msg); }, onComplete: function exit(success) { phantom.exit(success ? 0 : 1); } })); phantom.injectJs('./some-test.js'); jasmine.getEnv().execute();