dwf/rva: moved JasmineReporter 'base class' to jasmine.js
This commit is contained in:
@@ -1,28 +1,3 @@
|
||||
JasmineReporters.reporter = function (elementId) {
|
||||
var that = {
|
||||
element: document.getElementById(elementId),
|
||||
output: '',
|
||||
|
||||
addResults: function (results) { that.output = ''; },
|
||||
|
||||
addSpecResults: function (results) { that.output = ''; },
|
||||
|
||||
report: function () {
|
||||
if (that.element) {
|
||||
that.element.innerHTML += that.output;
|
||||
}
|
||||
return that.output;
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: throw if no element?
|
||||
if (that.element) {
|
||||
that.element.innerHTML = '';
|
||||
}
|
||||
|
||||
return that;
|
||||
}
|
||||
|
||||
JasmineReporters.JSON = function (elementId) {
|
||||
var that = JasmineReporters.reporter(elementId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user