Home page Forum Wiki Mail Jabber Devel NIX-FILES

AltLUG Git

Git-repositories of Altai Linux User Group

Cleanup reset() test and usage - run testDone callback first, to allow listeneres...
authorJörn Zaefferer <joern.zaefferer@gmail.com>
Sat, 21 Apr 2012 12:37:15 +0000 (14:37 +0200)
committerJörn Zaefferer <joern.zaefferer@gmail.com>
Sat, 21 Apr 2012 12:37:15 +0000 (14:37 +0200)
qunit/qunit.js
test/test.js

index 32fc4f3..f18974f 100644 (file)
@@ -244,8 +244,6 @@ Test.prototype = {
                        }
                }
 
-               QUnit.reset();
-
                runLoggingCallbacks( "testDone", QUnit, {
                        name: this.testName,
                        module: this.module,
@@ -253,6 +251,8 @@ Test.prototype = {
                        passed: this.assertions.length - bad,
                        total: this.assertions.length
                });
+
+               QUnit.reset();
        },
 
        queue: function() {
index 9379b17..efbbd4b 100644 (file)
@@ -461,23 +461,17 @@ test('Circular reference - test reported by soniciq in #105', function() {
        deepEqual(a.children(), [b]);
 });
 
-
-
-
 (function() {
        var reset = QUnit.reset;
-       function afterTest() {
-               ok( false, "reset should not modify test status" );
-       }
        module("reset");
        test("reset runs assertions", function() {
                expect(0);
                QUnit.reset = function() {
-                       afterTest();
+                       ok( false, "reset should not modify test status" );
                        reset.apply( this, arguments );
                };
        });
-       test("reset runs assertions2", function() {
+       test("reset runs assertions, cleanup", function() {
                expect(0);
                QUnit.reset = reset;
        });

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