dwf/rva: moved JasmineReporter 'base class' to jasmine.js

This commit is contained in:
pivotal
2008-12-05 10:22:03 -08:00
parent 80e1d6b6e8
commit 665c3e9f33
3 changed files with 68 additions and 83 deletions

View File

@@ -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);