wdio-summary-reporter
Advanced tools
Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "wdio-summary-reporter", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "src/reporter/reporter.js", |
@@ -11,5 +11,12 @@ const events = require('events'); | ||
this.options = options; | ||
this.specs = {}; | ||
this.results = {}; | ||
this.on('runner:start', function (runner) { | ||
console.log('Runner:', JSON.stringify(runner)); | ||
this.specs[runner.cid] = runner.specs | ||
this.results[runner.cid] = { | ||
passing: 0, | ||
pending: 0, | ||
failing: 0 | ||
}; | ||
}); | ||
@@ -20,11 +27,19 @@ | ||
this.on('test:pending', function (test) { | ||
console.log('Cid is', test.cid); | ||
this.results[test.cid].pending++; | ||
}); | ||
this.on('test:pass', function (test) { | ||
console.log(test); | ||
this.results[test.cid].passing++ | ||
}); | ||
this.on('test:fail', function (test) { | ||
this.results[test.cid].failing++ | ||
}); | ||
this.on('runner:end', function (runner) { | ||
}); | ||
this.on('end', function (runner) { | ||
console.log(JSON.stringify(this.results)); | ||
}); | ||
@@ -31,0 +46,0 @@ } |
1879
35