dwf/rva: moved JasmineReporter 'base class' to jasmine.js
This commit is contained in:
@@ -304,27 +304,37 @@ var Jasmine = Runner();
|
||||
var currentSuite;
|
||||
var currentSpec;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/*
|
||||
* TODO:
|
||||
//* - add spec or description to results
|
||||
//* - spec.execute needs to wait until the spec is done
|
||||
//* - an async test will be killed after X ms if not done and then listed as failed with an "async fail" message of some sort
|
||||
//* - Suite to run tests in order, constructed with a function called describe
|
||||
* - Suite supports before
|
||||
* - Suite supports after
|
||||
//* - Suite supports beforeEach
|
||||
//* - Suite supports afterEach
|
||||
//* - Suite rolls up spec results
|
||||
//* - Suite supports asynch
|
||||
//* - Runner that runs suites in order
|
||||
//* - Runner supports async
|
||||
* - HTML reporter
|
||||
* - Shows pass/fail progress (just like bootstrap reporter)
|
||||
* - Lists a Summary: total # specs, # of passed, # of failed
|
||||
* - Failed reports lists all specs that failed and what the failure was
|
||||
* - Failed output is styled with red
|
||||
* - JSON reporter
|
||||
* - Lists full results as a JSON object/string
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user