jasmine/lib/json_reporter.js

28 lines
601 B
JavaScript
Raw Normal View History

JasmineReporters.JSON = function (elementId) {
var that = JasmineReporters.reporter(elementId);
that.reportRunnerResults = function (results) {
that.output = Object.toJSON(results);
if (that.element) {
that.element.innerHTML += that.output;
}
}
return that;
}
JasmineReporters.IncrementalJSON = function (elementId) {
var that = JasmineReporters.reporter(elementId);
that.reportSpecResults = function (results) {
that.output = Object.toJSON(results);
if (that.element) {
that.element.innerHTML += that.output;
}
}
return that;
}