Skip to content

Commit 4467ed6

Browse files
grimalschidmethvin
authored andcommitted
Event: Fully clean up events in unit test
Closes gh-1685
1 parent bc1cb12 commit 4467ed6

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
@@ -992,6 +992,7 @@ test("trigger() bubbling", function() {
992992
equal( win, 4, "doc bubble" );
993993

994994
// manually clean up events from elements outside the fixture
995+
jQuery(window).off("click");
995996
jQuery(document).off("click");
996997
jQuery("html, body, #qunit-fixture").off("click");
997998
});
@@ -2036,7 +2037,7 @@ test("Non DOM element events", function() {
20362037
ok( true, "Event on non-DOM object triggered" );
20372038
});
20382039

2039-
jQuery(o).trigger("nonelementobj");
2040+
jQuery(o).trigger("nonelementobj").off("nonelementobj");
20402041
});
20412042

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

0 commit comments

Comments
 (0)