1
0
Fork 0

Prefixing warning output with 'Warning: '

closure/master
Mike Gerwitz 2011-11-05 12:10:20 -04:00
parent bc589c035f
commit c77d989b63
2 changed files with 4 additions and 4 deletions

View File

@ -107,7 +107,7 @@ exports.handlers = {
var dest; var dest;
console && ( dest = console.warn || console.log ) && console && ( dest = console.warn || console.log ) &&
dest( warning.message ); dest( 'Warning: ' + warning.message );
}, },

View File

@ -63,8 +63,8 @@ function backupConsole()
console = { console = {
warn: function( message ) warn: function( message )
{ {
assert.equal( message, warning.message, assert.equal( ( 'Warning: ' + warning.message ), message,
"Should log proper message to console" "Should log proper message to console, prefixed with 'Warning'"
); );
logged = true; logged = true;
@ -125,7 +125,7 @@ function backupConsole()
// attempt to log // attempt to log
warn.handlers.log( warning ); warn.handlers.log( warning );
assert.equal( given, warning.message, assert.equal( ( 'Warning: ' + warning.message ), given,
"Should fall back to log() and log proper message" "Should fall back to log() and log proper message"
); );