dwf: made Jasmine & Jasmine.Reporters namespaces; the instance of Jasmine is now just jasmine.

This commit is contained in:
pivotal
2008-12-08 13:01:06 -08:00
parent b8a8dc4562
commit 821fb54934
9 changed files with 157 additions and 158 deletions
+6 -21
View File
@@ -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;
//}