dwf: made Jasmine & Jasmine.Reporters namespaces; the instance of Jasmine is now just jasmine.
This commit is contained in:
+6
-21
@@ -3,8 +3,8 @@
|
||||
* Basic reporter that keeps a JSON string of the most recent Spec, Suite or Runner
|
||||
* result. Calling application can then do whatever it wants/needs with the string;
|
||||
*/
|
||||
JasmineReporters.JSON = function () {
|
||||
var that = JasmineReporters.reporter();
|
||||
Jasmine.Reporters.JSON = function () {
|
||||
var that = Jasmine.Reporters.reporter();
|
||||
that.specJSON = '';
|
||||
that.suiteJSON = '';
|
||||
that.runnerJSON = '';
|
||||
@@ -27,7 +27,7 @@ JasmineReporters.JSON = function () {
|
||||
return that;
|
||||
}
|
||||
|
||||
var domWriter = function (elementId) {
|
||||
Jasmine.Reporters.domWriter = function (elementId) {
|
||||
var that = {
|
||||
element: document.getElementById(elementId),
|
||||
|
||||
@@ -43,10 +43,10 @@ var domWriter = function (elementId) {
|
||||
return that;
|
||||
}
|
||||
|
||||
JasmineReporters.JSONtoDOM = function (elementId) {
|
||||
var that = JasmineReporters.JSON();
|
||||
Jasmine.Reporters.JSONtoDOM = function (elementId) {
|
||||
var that = Jasmine.Reporters.JSON();
|
||||
|
||||
that.domWriter = domWriter(elementId);
|
||||
that.domWriter = Jasmine.Reporters.domWriter(elementId);
|
||||
|
||||
var writeRunnerResults = function (results) {
|
||||
that.domWriter.write(Object.toJSON(results));
|
||||
@@ -56,18 +56,3 @@ JasmineReporters.JSONtoDOM = function (elementId) {
|
||||
|
||||
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;
|
||||
//}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user