Skip to content

Commit

Permalink
Event: Fully clean up events in unit test
Browse files Browse the repository at this point in the history
Closes gh-1685
(cherry picked from commit 4467ed6)
  • Loading branch information
grimalschi authored and dmethvin committed Dec 8, 2014
1 parent 61df648 commit ef93f95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/unit/event.js
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ test("trigger() bubbling", function() {
equal( win, 4, "doc bubble" );

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

jQuery(o).trigger("nonelementobj");
jQuery(o).trigger("nonelementobj").off("nonelementobj");
});

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

0 comments on commit ef93f95

Please sign in to comment.