Prefixing warning output with 'Warning: '
parent
bc589c035f
commit
c77d989b63
|
@ -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 );
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue