Merge pull request #187 from robmadole/master
Clear the summary after each run when using grunt watch #145
This commit is contained in:
commit
976b3a7fd8
@ -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) {
|
||||||
|
2
test/fixtures/pivotal/spec/SpecHelper.js
vendored
2
test/fixtures/pivotal/spec/SpecHelper.js
vendored
@ -1,5 +1,5 @@
|
|||||||
beforeEach(function () {
|
beforeEach(function () {
|
||||||
jasmine.Expectation.addMatchers({
|
jasmine.addMatchers({
|
||||||
toBePlaying: function () {
|
toBePlaying: function () {
|
||||||
return {
|
return {
|
||||||
compare: function (actual, expected) {
|
compare: function (actual, expected) {
|
||||||
|
Loading…
Reference in New Issue
Block a user