Permalink
Browse files

Tests: add test for passing trigger data to radio click handler

Close gh-3581
Fixes gh-3579
  • Loading branch information...
timmywil committed Mar 20, 2017
1 parent 35785a3 commit a6b0705294d336ae2f63f7276de0da1195495363
Showing with 10 additions and 0 deletions.
  1. +10 −0 test/unit/event.js
View
@@ -2915,6 +2915,16 @@ QUnit.test( "originalEvent property for Chrome, Safari, Fx & Edge of simulated e
outer.off( "focusin" );
} );
QUnit.test( "trigger('click') on radio passes extra params", function( assert ) {
assert.expect( 1 );
var $radio = jQuery( "<input type='radio' />" ).appendTo( "#qunit-fixture" )
.on( "click", function( e, data ) {
assert.ok( data, "Trigger data is passed to radio click handler" );
} );
$radio.trigger( "click", [ true ] );
} );
QUnit[ jQuery.fn.click ? "test" : "skip" ]( "trigger() shortcuts", function( assert ) {
assert.expect( 5 );

0 comments on commit a6b0705

Please sign in to comment.