Moved status init of defaults in setup(). Fixes gruntjs/grunt-contrib-jasmine#50
This commit is contained in:
parent
ea5334ec7e
commit
2069f109e2
@ -21,15 +21,7 @@ module.exports = function(grunt) {
|
||||
|
||||
var junitTemplate = __dirname + '/jasmine/templates/JUnit.tmpl';
|
||||
|
||||
var status = {
|
||||
specs : 0,
|
||||
failed : 0,
|
||||
passed : 0,
|
||||
total : 0,
|
||||
skipped : 0,
|
||||
duration : 0,
|
||||
log : ''
|
||||
};
|
||||
var status = {};
|
||||
|
||||
grunt.registerMultiTask('jasmine', 'Run jasmine specs headlessly through PhantomJS.', function() {
|
||||
|
||||
@ -116,6 +108,16 @@ module.exports = function(grunt) {
|
||||
function setup(options) {
|
||||
var thisRun = {};
|
||||
|
||||
status = {
|
||||
specs : 0,
|
||||
failed : 0,
|
||||
passed : 0,
|
||||
total : 0,
|
||||
skipped : 0,
|
||||
duration : 0,
|
||||
log : ''
|
||||
};
|
||||
|
||||
phantomjs.on('fail.timeout',function(){
|
||||
grunt.log.writeln();
|
||||
grunt.warn('PhantomJS timed out, possibly due to an unfinished async spec.', 90);
|
||||
@ -242,4 +244,4 @@ module.exports = function(grunt) {
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user