Show the name of the constructor function when printing an any
- instead of a `toString` of the entire constructor Fixes #796
This commit is contained in:
@@ -22,7 +22,7 @@ describe("Any", function() {
|
||||
|
||||
expect(any.asymmetricMatch({})).toBe(true);
|
||||
});
|
||||
|
||||
|
||||
it("matches a Boolean", function() {
|
||||
var any = new j$.Any(Boolean);
|
||||
|
||||
@@ -39,8 +39,7 @@ describe("Any", function() {
|
||||
it("jasmineToString's itself", function() {
|
||||
var any = new j$.Any(Number);
|
||||
|
||||
expect(any.jasmineToString()).toMatch('<jasmine.any');
|
||||
expect(any.jasmineToString()).toMatch('Number');
|
||||
expect(any.jasmineToString()).toEqual('<jasmine.any(Number)>');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -29,7 +29,7 @@ getJasmineRequireObj().Any = function() {
|
||||
};
|
||||
|
||||
Any.prototype.jasmineToString = function() {
|
||||
return '<jasmine.any(' + this.expectedObject + ')>';
|
||||
return '<jasmine.any(' + j$.fnNameFor(this.expectedObject) + ')>';
|
||||
};
|
||||
|
||||
return Any;
|
||||
|
||||
Reference in New Issue
Block a user