Update pretty print specs to work in IE8

This commit is contained in:
Gregg Van Hove
2016-09-27 12:26:02 -07:00
parent f4849f6401
commit 1efed4c156

View File

@@ -195,7 +195,11 @@ describe("jasmineUnderTest.pp", function () {
toString: function () { return Object.prototype.toString.call(this); }
};
expect(jasmineUnderTest.pp(objFromOtherContext)).toEqual("Object({ foo: 'bar', toString: Function })");
if (jasmine.getEnv().ieVersion < 9) {
expect(jasmineUnderTest.pp(objFromOtherContext)).toEqual("Object({ foo: 'bar' })");
} else {
expect(jasmineUnderTest.pp(objFromOtherContext)).toEqual("Object({ foo: 'bar', toString: Function })");
}
});
it("should stringify objects from anonymous constructors with custom toString", function () {