]> source.dussan.org Git - jquery.git/commitdiff
Add setup function for the event module
authorOleg <markelog@gmail.com>
Mon, 30 Sep 2013 17:12:58 +0000 (21:12 +0400)
committerOleg <markelog@gmail.com>
Mon, 30 Sep 2013 17:12:58 +0000 (21:12 +0400)
test/unit/event.js

index ce4536363236fe1043d9184ef05eeeb781afc208..11db61d1a688f1825641f94625db8579a6079ef9 100644 (file)
@@ -1,4 +1,9 @@
-module("event", { teardown: moduleTeardown });
+module( "event", {
+       setup: function() {
+               document.body.focus();
+       },
+       teardown: moduleTeardown
+});
 
 test("null or undefined handler", function() {
        expect(2);
@@ -2571,8 +2576,6 @@ test( "Check order of focusin/focusout events", 2, function() {
        var focus, blur,
                input = jQuery( "#name" );
 
-       document.body.focus();
-
        input.on( "focus", function() {
                focus = true;