Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

onerror: force display of global errors despite URL parameters. Fixes #288 - Global...
authorRichard Gibson <richard.gibson@gmail.com>
Fri, 17 Aug 2012 11:38:16 +0000 (13:38 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Fri, 17 Aug 2012 11:38:16 +0000 (13:38 +0200)
qunit/qunit.js

index 6c6c4d2..cf3e6b1 100644 (file)
@@ -1062,9 +1062,9 @@ window.onerror = function ( error, filePath, linerNr ) {
                        }
                        QUnit.pushFailure( error, filePath + ":" + linerNr );
                } else {
-                       QUnit.test( "global failure", function() {
+                       QUnit.test( "global failure", extend( function() {
                                QUnit.pushFailure( error, filePath + ":" + linerNr );
-                       });
+                       }, { validTest: validTest } ) );
                }
                return false;
        }
@@ -1146,6 +1146,12 @@ function validTest( test ) {
                module = config.module && config.module.toLowerCase(),
                fullName = (test.module + ": " + test.testName).toLowerCase();
 
+       // Internally-generated tests are always valid
+       if ( test.callback && test.callback.validTest === validTest ) {
+               delete test.callback.validTest;
+               return true;
+       }
+
        if ( config.testNumber ) {
                return test.testNumber === config.testNumber;
        }

Hosting is provided AltSPAHow to use Git
Please direct any questions on jabber alex.wolf@jabber.ru

Valid HTML 4.0 Transitional Valid CSS!

Designer Alexander Wolf