From f71218a44b4d6d6a80f1e4a2414b6faf8cfca8ec Mon Sep 17 00:00:00 2001 From: Gregg Van Hove Date: Tue, 18 Jul 2017 21:07:38 -0700 Subject: [PATCH] Allow IE8 to be weird when pretty printing --- 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 e3e64f01..a834a1d1 100644 --- a/spec/core/PrettyPrintSpec.js +++ b/spec/core/PrettyPrintSpec.js @@ -262,7 +262,11 @@ describe("jasmineUnderTest.pp", function () { toString: "foo" }; - expect(jasmineUnderTest.pp(obj)).toEqual("Object({ toString: 'foo' })"); + if (jasmine.getEnv().ieVersion < 9) { + expect(jasmineUnderTest.pp(obj)).toEqual("Object({ toString: 'foo' })"); + } else { + expect(jasmineUnderTest.pp(obj)).toEqual("Object({ })"); + } }); it("should stringify objects from anonymous constructors with custom toString", function () {