Skip to content

Commit ef93f95

Browse files
grimalschidmethvin
authored andcommitted
Event: Fully clean up events in unit test
Closes gh-1685 (cherry picked from commit 4467ed6)
1 parent 61df648 commit ef93f95

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/unit/event.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,6 +1004,7 @@ test("trigger() bubbling", function() {
10041004
equal( win, 4, "doc bubble" );
10051005

10061006
// manually clean up events from elements outside the fixture
1007+
jQuery(window).off("click");
10071008
jQuery(document).off("click");
10081009
jQuery("html, body, #qunit-fixture").off("click");
10091010
});
@@ -2123,7 +2124,7 @@ test("Non DOM element events", function() {
21232124
ok( true, "Event on non-DOM object triggered" );
21242125
});
21252126

2126-
jQuery(o).trigger("nonelementobj");
2127+
jQuery(o).trigger("nonelementobj").off("nonelementobj");
21272128
});
21282129

21292130
test("inline handler returning false stops default", function() {

0 commit comments

Comments
 (0)