Refer to MatchersUtil instances as matchersUtil, not util
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
getJasmineRequireObj().Expector = function(j$) {
|
||||
function Expector(options) {
|
||||
this.util = options.util || { buildFailureMessage: function() {} };
|
||||
this.matchersUtil = options.matchersUtil || {
|
||||
buildFailureMessage: function() {}
|
||||
};
|
||||
this.customEqualityTesters = options.customEqualityTesters || [];
|
||||
this.actual = options.actual;
|
||||
this.addExpectationResult = options.addExpectationResult || function() {};
|
||||
@@ -18,7 +20,7 @@ getJasmineRequireObj().Expector = function(j$) {
|
||||
|
||||
this.args.unshift(this.actual);
|
||||
|
||||
var matcher = matcherFactory(this.util, this.customEqualityTesters);
|
||||
var matcher = matcherFactory(this.matchersUtil, this.customEqualityTesters);
|
||||
var comparisonFunc = this.filters.selectComparisonFunc(matcher);
|
||||
return comparisonFunc || matcher.compare;
|
||||
};
|
||||
@@ -34,7 +36,7 @@ getJasmineRequireObj().Expector = function(j$) {
|
||||
result,
|
||||
this.matcherName,
|
||||
this.args,
|
||||
this.util,
|
||||
this.matchersUtil,
|
||||
defaultMessage
|
||||
);
|
||||
return this.filters.modifyFailureMessage(msg || defaultMessage());
|
||||
@@ -44,7 +46,10 @@ getJasmineRequireObj().Expector = function(j$) {
|
||||
var args = self.args.slice();
|
||||
args.unshift(false);
|
||||
args.unshift(self.matcherName);
|
||||
return self.util.buildFailureMessage.apply(self.util, args);
|
||||
return self.matchersUtil.buildFailureMessage.apply(
|
||||
self.matchersUtil,
|
||||
args
|
||||
);
|
||||
} else if (j$.isFunction_(result.message)) {
|
||||
return result.message();
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user