grunt-contrib-jasmine/tasks/jasmine/jasmine-helper.js
2012-11-07 10:56:19 -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();
}
}());