diff options
Diffstat (limited to 'test/unit/event.js')
-rw-r--r-- | test/unit/event.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/unit/event.js b/test/unit/event.js index f3d314884..5efa0ec51 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -1,5 +1,25 @@ module("event"); +test("null or undefined handler", function() { + expect(2); + // Supports Fixes bug #7229 + try { + + jQuery("#firstp").click(null); + + ok(true, "Passing a null handler will not throw an exception"); + + } catch (e) {} + + try { + + jQuery("#firstp").click(undefined); + + ok(true, "Passing an undefined handler will not throw an exception"); + + } catch (e) {} +}); + test("bind(), with data", function() { expect(3); var handler = function(event) { |