anything and stringMatching have custom pretty-print now.
This commit is contained in:
@@ -35,4 +35,10 @@ describe("Anything", function() {
|
||||
|
||||
expect(anything.asymmetricMatch(null)).toBe(false);
|
||||
});
|
||||
|
||||
it("jasmineToString's itself", function() {
|
||||
var anything = new j$.Anything();
|
||||
|
||||
expect(anything.jasmineToString()).toEqual("<jasmine.anything>");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -18,4 +18,10 @@ describe("StringMatching", function() {
|
||||
new j$.StringMatching({});
|
||||
}).toThrowError(/not a String or a RegExp/);
|
||||
});
|
||||
|
||||
it("jasmineToString's itself", function() {
|
||||
var matching = new j$.StringMatching(/^foo/);
|
||||
|
||||
expect(matching.jasmineToString()).toEqual("<jasmine.stringMatching(/^foo/)>");
|
||||
});
|
||||
});
|
||||
|
||||
@@ -6,5 +6,9 @@ getJasmineRequireObj().Anything = function(j$) {
|
||||
return !j$.util.isUndefined(other) && other !== null;
|
||||
};
|
||||
|
||||
Anything.prototype.jasmineToString = function() {
|
||||
return "<jasmine.anything>";
|
||||
};
|
||||
|
||||
return Anything;
|
||||
};
|
||||
|
||||
@@ -12,5 +12,9 @@ getJasmineRequireObj().StringMatching = function(j$) {
|
||||
return this.regexp.test(other);
|
||||
};
|
||||
|
||||
StringMatching.prototype.jasmineToString = function() {
|
||||
return "<jasmine.stringMatching(" + this.regexp + ")>";
|
||||
};
|
||||
|
||||
return StringMatching;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user