mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
Tests: add test for passing trigger data to radio click handler
Close gh-3581 Fixes gh-3579
This commit is contained in:
parent
35785a3229
commit
a6b0705294
@ -2915,6 +2915,16 @@ QUnit.test( "originalEvent property for Chrome, Safari, Fx & Edge of simulated e
|
|||||||
outer.off( "focusin" );
|
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 ) {
|
QUnit[ jQuery.fn.click ? "test" : "skip" ]( "trigger() shortcuts", function( assert ) {
|
||||||
assert.expect( 5 );
|
assert.expect( 5 );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user