From: Veaceslav Grimalschi Date: Wed, 8 Oct 2014 11:24:55 +0000 (+0400) Subject: Event: Fully clean up events in unit test X-Git-Tag: 3.0.0-alpha1+compat~187 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=ef93f9545263f3ed456367506ac7226c921cd243;p=jquery.git Event: Fully clean up events in unit test Closes gh-1685 (cherry picked from commit 4467ed606ab0a9b28ed495e682576910937fa5e0) --- diff --git a/test/unit/event.js b/test/unit/event.js index fb3b75abc..412fb87bc 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -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"); }); @@ -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() {