grunt-contrib-jasmine/tasks/jasmine/jasmine-helper.js
Jarrod Overson a3eb0b4f5f Ported the entirety of grunt-jasmine-runner/grunt-jasmine-task to grunt-contrib-jasmine
with changes necessary to conform to contrib standards and grunt 0.4.0 best practices

Squashed 53 commits
2012-11-06 17:09:13 -08:00

32 lines
619 B
JavaScript

/*global jasmine:false, window:false, document:false*/
(function(){
'use strict';
var jasmineEnv = jasmine.getEnv();
jasmineEnv.updateInterval = 1000;
var htmlReporter = new jasmine.HtmlReporter();
jasmineEnv.addReporter(htmlReporter);
jasmineEnv.specFilter = function(spec) {
return htmlReporter.specFilter(spec);
};
var currentWindowOnload = window.onload;
if (document.readyState !== 'complete') {
window.onload = function() {
if (currentWindowOnload) {
currentWindowOnload();
}
jasmineEnv.execute();
};
} else {
jasmineEnv.execute();
}
}());