Remove obsolete MessageResult
- jasmine.log is no longer supported.
This commit is contained in:
@@ -61,25 +61,6 @@ jasmine.getGlobal = function() {
|
|||||||
return getGlobal();
|
return getGlobal();
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.MessageResult = function(values) {
|
|
||||||
this.type = 'log';
|
|
||||||
this.values = values;
|
|
||||||
this.trace = new Error(); // todo: test better
|
|
||||||
};
|
|
||||||
|
|
||||||
jasmine.MessageResult.prototype.toString = function() {
|
|
||||||
var text = "";
|
|
||||||
for (var i = 0; i < this.values.length; i++) {
|
|
||||||
if (i > 0) text += " ";
|
|
||||||
if (jasmine.isString_(this.values[i])) {
|
|
||||||
text += this.values[i];
|
|
||||||
} else {
|
|
||||||
text += jasmine.pp(this.values[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return text;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the Jasmine environment. Ensures one gets created
|
* Getter for the Jasmine environment. Ensures one gets created
|
||||||
*/
|
*/
|
||||||
@@ -1541,14 +1522,6 @@ jasmine.NestedResults.prototype.rollupCounts = function(result) {
|
|||||||
this.failedCount += result.failedCount;
|
this.failedCount += result.failedCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a log message.
|
|
||||||
* @param values Array of message parts which will be concatenated later.
|
|
||||||
*/
|
|
||||||
jasmine.NestedResults.prototype.log = function(values) {
|
|
||||||
this.items_.push(new jasmine.MessageResult(values));
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the results: message & results.
|
* Getter for the results: message & results.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,19 +0,0 @@
|
|||||||
describe("base.js", function() {
|
|
||||||
describe("jasmine.MessageResult", function() {
|
|
||||||
it("#toString should pretty-print and concatenate each part of the message", function() {
|
|
||||||
var values = ["log", "message", 123, {key: "value"}, "FTW!"];
|
|
||||||
var messageResult = new jasmine.MessageResult(values);
|
|
||||||
expect(messageResult.toString()).toEqual("log message 123 { key : 'value' } FTW!");
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe("jasmine.getGlobal", function() {
|
|
||||||
it("should return the global object", function() {
|
|
||||||
var globalObject = (function() {
|
|
||||||
return this;
|
|
||||||
})();
|
|
||||||
|
|
||||||
expect(jasmine.getGlobal()).toBe(globalObject);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -37,14 +37,6 @@ jasmine.NestedResults.prototype.rollupCounts = function(result) {
|
|||||||
this.failedCount += result.failedCount;
|
this.failedCount += result.failedCount;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a log message.
|
|
||||||
* @param values Array of message parts which will be concatenated later.
|
|
||||||
*/
|
|
||||||
jasmine.NestedResults.prototype.log = function(values) {
|
|
||||||
this.items_.push(new jasmine.MessageResult(values));
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the results: message & results.
|
* Getter for the results: message & results.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -61,25 +61,6 @@ jasmine.getGlobal = function() {
|
|||||||
return getGlobal();
|
return getGlobal();
|
||||||
};
|
};
|
||||||
|
|
||||||
jasmine.MessageResult = function(values) {
|
|
||||||
this.type = 'log';
|
|
||||||
this.values = values;
|
|
||||||
this.trace = new Error(); // todo: test better
|
|
||||||
};
|
|
||||||
|
|
||||||
jasmine.MessageResult.prototype.toString = function() {
|
|
||||||
var text = "";
|
|
||||||
for (var i = 0; i < this.values.length; i++) {
|
|
||||||
if (i > 0) text += " ";
|
|
||||||
if (jasmine.isString_(this.values[i])) {
|
|
||||||
text += this.values[i];
|
|
||||||
} else {
|
|
||||||
text += jasmine.pp(this.values[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return text;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Getter for the Jasmine environment. Ensures one gets created
|
* Getter for the Jasmine environment. Ensures one gets created
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user