code: function injectReporter() {
    page.evaluate(function (script) {
      function print(msg) {
        console.log(msg);
      }
  
      function onComplete(passed) {
        window.callPhantom(passed);
      }
  
      eval(script);
  
      var reporter = new ConsoleReporter();
      reporter.setOptions({
        print: print,
        printDeprecation: print,
        showColors: true,
        onComplete: onComplete
      });
  
      jasmine.getEnv().addReporter(reporter);
    }, reporterScript);
  }
docs: Inject the ConsoleReporter's source into the browser context and register an instance as a reporter.