File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 11var runTests = function ( testFuncs , testNum ) {
22 var failed = false ;
33 var successCount = 0 ;
4+ var currentTest = 0 ;
45
56 window . fail = function ( ) {
67 failed = true ;
8+ var testInfo = 'Test ' + currentTest ;
9+ console . error ( 'FAILED: ' + testInfo , new Error ( ) ) ;
10+ var el = document . getElementById ( 'failed' ) ;
11+ el . style . display = 'block' ;
12+ el . innerHTML += '<div style="color:#c00;font-size:14px;margin-top:8px">' + testInfo + ' failed</div>' ;
713 document . getElementById ( 'success' ) . style . display = 'none' ;
8- document . getElementById ( 'failed' ) . style . display = 'block' ;
914 document . getElementById ( 'running' ) . style . display = 'none' ;
10- console . error ( new Error ( ) ) ;
1115 } ;
1216
1317 window . failCallback = function ( ) {
@@ -44,8 +48,9 @@ var runTests = function(testFuncs, testNum) {
4448 } ;
4549
4650 for ( var i = 0 ; i < testFuncs . length ; ++ i ) {
51+ currentTest = i + 1 ;
4752 if ( typeof testNum !== 'undefined' ) {
48- // testing only one test
53+ // testing only one test
4954 if ( i === testNum ) {
5055 testFuncs [ i ] ( ) ;
5156 } else {
You can’t perform that action at this time.
0 commit comments