From a6b0705294d336ae2f63f7276de0da1195495363 Mon Sep 17 00:00:00 2001 From: Timmy Willison <4timmywil@gmail.com> Date: Mon, 20 Mar 2017 12:54:38 -0400 Subject: [PATCH] Tests: add test for passing trigger data to radio click handler Close gh-3581 Fixes gh-3579 --- test/unit/event.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/unit/event.js b/test/unit/event.js index 02aad5e36..0c379d051 100644 --- a/test/unit/event.js +++ b/test/unit/event.js @@ -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( "" ).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 );