dwf/rva: added JSONReporter
This commit is contained in:
@@ -279,14 +279,24 @@ var Runner = function () {
|
||||
that.suites = that.actions;
|
||||
that.results.description = 'All Jasmine Suites';
|
||||
|
||||
that.finishCallback = function () {
|
||||
if (that.reporter) {
|
||||
that.reporter.addResults(that.results);
|
||||
that.reporter.report();
|
||||
}
|
||||
}
|
||||
|
||||
Jasmine = that;
|
||||
return that;
|
||||
}
|
||||
|
||||
var JasmineReporters = {};
|
||||
|
||||
var Jasmine = Runner();
|
||||
var currentSuite;
|
||||
var currentSpec;
|
||||
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
//* - add spec or description to results
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
JasmineReporters.JSON = function () {
|
||||
var that = {
|
||||
results: {},
|
||||
|
||||
addResults: function (results) {
|
||||
that.results = results;
|
||||
},
|
||||
|
||||
report: function () {
|
||||
return Object.toJSON(that.results);
|
||||
}
|
||||
}
|
||||
return that;
|
||||
}
|
||||
|
||||
Jasmine.reporter = JasmineReporters.JSON();
|
||||
|
||||
Reference in New Issue
Block a user