Fixed minor bug with Safari and the test suite.
[jquery.git] / build / test / data / testrunner.js
index db97215..0b6e08d 100644 (file)
@@ -50,12 +50,12 @@ function runTest(tests) {
 }
 
 function test(name, callback) {
-       Test = [];
        synchronize(function() {
+               Test = [];
                try {
                        callback();
                } catch(e) {
-                       if(typeof console != "undefined") {
+                       if( console && console.error ) {
                                console.error("Test " + name + " died, exception and test follows");
                                console.error(e);
                                console.warn(callback.toString());