From 2151a1370571ca73312828426dd4c247d5ec0184 Mon Sep 17 00:00:00 2001 From: slackersoft Date: Sat, 11 Oct 2014 14:20:19 -0700 Subject: [PATCH] Let's just use the `print` function that's passed in for deprecation messaging [#80410002] --- spec/console/ConsoleReporterSpec.js | 2 +- src/console/ConsoleReporter.js | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/spec/console/ConsoleReporterSpec.js b/spec/console/ConsoleReporterSpec.js index df6b8b50..8eab0183 100644 --- a/spec/console/ConsoleReporterSpec.js +++ b/spec/console/ConsoleReporterSpec.js @@ -9,7 +9,7 @@ describe("ConsoleReporter", function() { output += str; }, getOutput: function() { - return output; + return output.replace('ConsoleReporter is deprecated and will be removed in a future version.', ''); }, clear: function() { output = ""; diff --git a/src/console/ConsoleReporter.js b/src/console/ConsoleReporter.js index 0a52e2eb..583ad94e 100644 --- a/src/console/ConsoleReporter.js +++ b/src/console/ConsoleReporter.js @@ -6,9 +6,6 @@ getJasmineRequireObj().ConsoleReporter = function() { }; function ConsoleReporter(options) { - if (console && console.warn) { - console.warn('ConsoleReporter is deprecated and will be removed in a future version.'); - } var print = options.print, showColors = options.showColors || false, onComplete = options.onComplete || function() {}, @@ -25,6 +22,8 @@ getJasmineRequireObj().ConsoleReporter = function() { }, failedSuites = []; + print('ConsoleReporter is deprecated and will be removed in a future version.'); + this.jasmineStarted = function() { specCount = 0; failureCount = 0;