diff --git a/spec/suites/TrivialReporterSpec.js b/spec/suites/TrivialReporterSpec.js index 2470bb59..462a4e0b 100644 --- a/spec/suites/TrivialReporterSpec.js +++ b/spec/suites/TrivialReporterSpec.js @@ -172,6 +172,9 @@ describe("TrivialReporter", function() { var errorDiv = findElement(divs, 'resultMessage log'); expect(errorDiv.innerHTML).toEqual("this is a multipart log message"); }); + + xit("should work on IE without console.log.apply", function() { + }); }); describe("duplicate example names", function() { diff --git a/src/html/TrivialReporter.js b/src/html/TrivialReporter.js index c59f2dea..76a8a25d 100644 --- a/src/html/TrivialReporter.js +++ b/src/html/TrivialReporter.js @@ -162,7 +162,13 @@ jasmine.TrivialReporter.prototype.reportSpecResults = function(spec) { jasmine.TrivialReporter.prototype.log = function() { var console = jasmine.getGlobal().console; - if (console && console.log) console.log.apply(console, arguments); + if (console && console.log) { + if (console.log.apply) { + console.log.apply(console, arguments); + } else { + console.log(arguments); // ie fix: console.log.apply doesn't exist on ie + } + } }; jasmine.TrivialReporter.prototype.getLocation = function() {