File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ QUnit.module( "event", {
66} ) ;
77
88QUnit . test ( "null or undefined handler" , function ( assert ) {
9- assert . expect ( 2 ) ;
9+ assert . expect ( 4 ) ;
1010
1111 // Supports Fixes bug #7229
1212 try {
@@ -18,6 +18,13 @@ QUnit.test( "null or undefined handler", function( assert ) {
1818 jQuery ( "#firstp" ) . on ( "click" , undefined ) ;
1919 assert . ok ( true , "Passing an undefined handler will not throw an exception" ) ;
2020 } catch ( e ) { }
21+
22+ var expectedElem = jQuery ( "#firstp" ) ;
23+ var actualElem = expectedElem . on ( "click" , null ) ;
24+ assert . equal ( actualElem , expectedElem , "Passing a null handler should return the original element" ) ;
25+
26+ actualElem = expectedElem . on ( "click" , undefined ) ;
27+ assert . equal ( actualElem , expectedElem , "Passing a null handler should return the original element" ) ;
2128} ) ;
2229
2330QUnit . test ( "on() with non-null,defined data" , function ( assert ) {
You can’t perform that action at this time.
0 commit comments