mirror of https://github.com/vitalif/phantomjs
23 lines
617 B
JavaScript
23 lines
617 B
JavaScript
// Load Jasmine and the HTML reporter
|
|
phantom.injectJs("./lib/jasmine.js");
|
|
phantom.injectJs("./lib/jasmine-console.js");
|
|
|
|
// Load specs
|
|
phantom.injectJs("./fs-spec-01.js"); //< Filesystem Specs 01
|
|
|
|
// Launch tests
|
|
var jasmineEnv = jasmine.getEnv();
|
|
|
|
// Add a ConsoleReporter to 1) print with colors on the console 2) exit when finished
|
|
jasmineEnv.addReporter(new jasmine.ConsoleReporter(function(msg){
|
|
// Print messages straight to the console
|
|
console.log(msg);
|
|
}, function(reporter){
|
|
// On complete
|
|
phantom.exit();
|
|
}, true));
|
|
|
|
// Launch tests
|
|
jasmineEnv.updateInterval = 1000;
|
|
jasmineEnv.execute();
|