Changed 'type' field of MessageResult and ExpectationResult to 'log' and 'expect', respectively.
This commit is contained in:
@@ -84,7 +84,7 @@ jasmine.JsApiReporter.prototype.summarizeResult_ = function(result){
|
||||
for (var messageIndex = 0; messageIndex < messagesLength; messageIndex++) {
|
||||
var resultMessage = result.messages[messageIndex];
|
||||
summaryMessages.push({
|
||||
text: resultMessage.type == 'MessageResult' ? resultMessage.toString() : jasmine.undefined,
|
||||
text: resultMessage.type == 'log' ? resultMessage.toString() : jasmine.undefined,
|
||||
passed: resultMessage.passed ? resultMessage.passed() : true,
|
||||
type: resultMessage.type,
|
||||
message: resultMessage.message,
|
||||
|
||||
@@ -57,7 +57,7 @@ jasmine.NestedResults.prototype.getItems = function() {
|
||||
* @param {jasmine.ExpectationResult|jasmine.NestedResults} result
|
||||
*/
|
||||
jasmine.NestedResults.prototype.addResult = function(result) {
|
||||
if (result.type != 'MessageResult') {
|
||||
if (result.type != 'log') {
|
||||
if (result.items_) {
|
||||
this.rollupCounts(result);
|
||||
} else {
|
||||
|
||||
@@ -60,6 +60,9 @@ jasmine.Spec.prototype.addToQueue = function (block) {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {jasmine.ExpectationResult} result
|
||||
*/
|
||||
jasmine.Spec.prototype.addMatcherResult = function(result) {
|
||||
this.results_.addResult(result);
|
||||
};
|
||||
|
||||
@@ -52,7 +52,7 @@ jasmine.setInterval = jasmine.bindOriginal_(window, 'setInterval');
|
||||
jasmine.clearInterval = jasmine.bindOriginal_(window, 'clearInterval');
|
||||
|
||||
jasmine.MessageResult = function(values) {
|
||||
this.type = 'MessageResult';
|
||||
this.type = 'log';
|
||||
this.values = values;
|
||||
this.trace = new Error(); // todo: test better
|
||||
};
|
||||
@@ -71,7 +71,7 @@ jasmine.MessageResult.prototype.toString = function() {
|
||||
};
|
||||
|
||||
jasmine.ExpectationResult = function(params) {
|
||||
this.type = 'ExpectationResult';
|
||||
this.type = 'expect';
|
||||
this.matcherName = params.matcherName;
|
||||
this.passed_ = params.passed;
|
||||
this.expected = params.expected;
|
||||
|
||||
Reference in New Issue
Block a user