Skip to content

Instantly share code, notes, and snippets.

@fonzerelly
Created January 19, 2014 23:21
Show Gist options
  • Save fonzerelly/8512357 to your computer and use it in GitHub Desktop.
Save fonzerelly/8512357 to your computer and use it in GitHub Desktop.
Rhino based SpecRunner for jasmine
//Imported by Rhino on command shell
/*global load, print*/
load("lib/Timer.js");
/*global endAllTimers*/
load("lib/TextReporter.js");
/*global TextReporter*/
load("lib/jasmine-1.3.0/jasmine.js");
/*global jasmine*/
Array.prototype.splice.call(arguments).forEach( function (spec) {
load(spec);
});
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
var txtReporter = new TextReporter();
txtReporter.onRunnerFinished(function (text) {
// Do something with text //
print (text);
endAllTimers();
});
jasmineEnv.addReporter(txtReporter);
jasmine.getEnv().execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment