1
0
Fork 0

Outputting stack trace in browser tests if available

closure/master
Mike Gerwitz 2011-12-03 13:08:18 -05:00
parent 599f100cfa
commit f2e0bbc2f6
1 changed files with 11 additions and 1 deletions

View File

@ -353,7 +353,17 @@ function outputTestFailures( failures )
for ( i in failures ) for ( i in failures )
{ {
err += failures[ i ][ 0 ] + '; '; var failure = failures[ i ];
err += failure[ 0 ] +
' (' + ( failure[ 1 ].message || 'no message' ) + ')' +
( ( failure[ 1 ].stack )
? ( '<br />' +
failure[ 1 ].stack.replace( /\n/g, '<br />' ) +
'<br />'
)
: '; '
)
} }
throw Error( err ); throw Error( err );