diff --git a/lib/jasmine-core/jasmine-html.js b/lib/jasmine-core/jasmine-html.js index be86ad18..f2a05183 100644 --- a/lib/jasmine-core/jasmine-html.js +++ b/lib/jasmine-core/jasmine-html.js @@ -148,7 +148,7 @@ jasmineRequire.HtmlReporter = function(j$) { typeof console !== 'undefined' && typeof console.error !== 'undefined' ) { - console.error("Spec '" + result.fullName + "' has no expectations."); + console.warn("Spec '" + result.fullName + "' has no expectations."); } if (!symbols) { diff --git a/spec/html/HtmlReporterSpec.js b/spec/html/HtmlReporterSpec.js index a8790f87..2bff3c1f 100644 --- a/spec/html/HtmlReporterSpec.js +++ b/spec/html/HtmlReporterSpec.js @@ -80,7 +80,7 @@ describe('HtmlReporter', function() { describe('when a spec is done', function() { it('logs errors to the console and prints a special symbol if it is an empty spec', function() { if (typeof console === 'undefined') { - console = { error: function() {} }; + console = { warn: function() {} }; } var env = new jasmineUnderTest.Env(), @@ -99,7 +99,7 @@ describe('HtmlReporter', function() { } }); - spyOn(console, 'error'); + spyOn(console, 'warn'); reporter.initialize(); @@ -109,7 +109,7 @@ describe('HtmlReporter', function() { passedExpectations: [], failedExpectations: [] }); - expect(console.error).toHaveBeenCalledWith( + expect(console.warn).toHaveBeenCalledWith( "Spec 'Some Name' has no expectations." ); var specEl = container.querySelector('.jasmine-symbol-summary li'); diff --git a/src/html/HtmlReporter.js b/src/html/HtmlReporter.js index 2a89aaca..5d838ab3 100644 --- a/src/html/HtmlReporter.js +++ b/src/html/HtmlReporter.js @@ -119,7 +119,7 @@ jasmineRequire.HtmlReporter = function(j$) { typeof console !== 'undefined' && typeof console.error !== 'undefined' ) { - console.error("Spec '" + result.fullName + "' has no expectations."); + console.warn("Spec '" + result.fullName + "' has no expectations."); } if (!symbols) {