Fixes #145 by adding the summary to thisRun
This commit is contained in:
parent
b6f1be0585
commit
7bb22be249
@ -26,8 +26,6 @@ module.exports = function(grunt) {
|
|||||||
|
|
||||||
var status = {};
|
var status = {};
|
||||||
|
|
||||||
var summary = [];
|
|
||||||
|
|
||||||
var symbols = {
|
var symbols = {
|
||||||
none : {
|
none : {
|
||||||
check : '',
|
check : '',
|
||||||
@ -223,6 +221,7 @@ module.exports = function(grunt) {
|
|||||||
thisRun.passedSpecs = 0;
|
thisRun.passedSpecs = 0;
|
||||||
thisRun.failedSpecs = 0;
|
thisRun.failedSpecs = 0;
|
||||||
thisRun.skippedSpecs = 0;
|
thisRun.skippedSpecs = 0;
|
||||||
|
thisRun.summary = [];
|
||||||
});
|
});
|
||||||
|
|
||||||
phantomjs.on('jasmine.suiteStarted', function(suiteMetaData) {
|
phantomjs.on('jasmine.suiteStarted', function(suiteMetaData) {
|
||||||
@ -286,7 +285,7 @@ module.exports = function(grunt) {
|
|||||||
specSummary.failureMessages = specMetaData.failedExpectations.map(function(error){
|
specSummary.failureMessages = specMetaData.failedExpectations.map(function(error){
|
||||||
return error.message;
|
return error.message;
|
||||||
});
|
});
|
||||||
summary.push({
|
thisRun.summary.push({
|
||||||
suite: suites[currentSuite].name,
|
suite: suites[currentSuite].name,
|
||||||
name: specMetaData.description,
|
name: specMetaData.description,
|
||||||
errors: specMetaData.failedExpectations.map(function(error){
|
errors: specMetaData.failedExpectations.map(function(error){
|
||||||
@ -362,9 +361,9 @@ module.exports = function(grunt) {
|
|||||||
grunt.log.writeln();
|
grunt.log.writeln();
|
||||||
}
|
}
|
||||||
|
|
||||||
if(options.summary && summary.length) {
|
if(options.summary && thisRun.summary.length) {
|
||||||
grunt.log.writeln();
|
grunt.log.writeln();
|
||||||
logSummary(summary);
|
logSummary(thisRun.summary);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.junit && options.junit.path) {
|
if (options.junit && options.junit.path) {
|
||||||
|
Loading…
Reference in New Issue
Block a user