Merge pull request #187 from robmadole/master

Clear the summary after each run when using grunt watch #145
This commit is contained in:
Vlad Filippov 2015-01-08 16:06:41 -05:00
commit 976b3a7fd8
2 changed files with 5 additions and 6 deletions

View File

@ -26,8 +26,6 @@ module.exports = function(grunt) {
var status = {};
var summary = [];
var symbols = {
none : {
check : '',
@ -223,6 +221,7 @@ module.exports = function(grunt) {
thisRun.passedSpecs = 0;
thisRun.failedSpecs = 0;
thisRun.skippedSpecs = 0;
thisRun.summary = [];
});
phantomjs.on('jasmine.suiteStarted', function(suiteMetaData) {
@ -286,7 +285,7 @@ module.exports = function(grunt) {
specSummary.failureMessages = specMetaData.failedExpectations.map(function(error){
return error.message;
});
summary.push({
thisRun.summary.push({
suite: suites[currentSuite].name,
name: specMetaData.description,
errors: specMetaData.failedExpectations.map(function(error){
@ -362,9 +361,9 @@ module.exports = function(grunt) {
grunt.log.writeln();
}
if(options.summary && summary.length) {
if(options.summary && thisRun.summary.length) {
grunt.log.writeln();
logSummary(summary);
logSummary(thisRun.summary);
}
if (options.junit && options.junit.path) {

View File

@ -1,5 +1,5 @@
beforeEach(function () {
jasmine.Expectation.addMatchers({
jasmine.addMatchers({
toBePlaying: function () {
return {
compare: function (actual, expected) {