1
0
Fork 0

Warning test workaround for FF

- Note that warnings do work properly in practice in FF
closure/master
Mike Gerwitz 2011-12-04 11:38:24 -05:00
parent 446aa8d413
commit 0f4ce6acc1
1 changed files with 8 additions and 2 deletions

View File

@ -67,8 +67,14 @@ var common = require( './common' ),
*/
( function testCanWarningMessageIsSetFromWrappedException()
{
var err = Error( 'oshit' ),
warning = Warning( err );
var err = Error( 'oshit' );
// bug in FF (tested with 8.0) where, without accessing the message property
// in this test before passing it to Warning, err.message === "" within the
// Warning ctor.
err.message;
var warning = Warning( err );
assert.equal( warning.message, err.message,
"Warning message should be taken from wrapped exception"