From 1efed4c15624cbecb040335f5492c6748a5ce4e8 Mon Sep 17 00:00:00 2001 From: Gregg Van Hove Date: Tue, 27 Sep 2016 12:26:02 -0700 Subject: [PATCH] Update pretty print specs to work in IE8 --- spec/core/PrettyPrintSpec.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/core/PrettyPrintSpec.js b/spec/core/PrettyPrintSpec.js index 212337a3..a6c6057f 100644 --- a/spec/core/PrettyPrintSpec.js +++ b/spec/core/PrettyPrintSpec.js @@ -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 () {