Last active
August 29, 2015 14:07
-
-
Save marcysutton/a86caae809a9e35bc887 to your computer and use it in GitHub Desktop.
Angular Material Radio Button Spec
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var TestUtil = { | |
/** | |
* Creates a jQuery event for unit testing such that an event name and optional keyCode can be passed in. | |
* | |
*/ | |
triggerEvent: function (element, eventName, eventData) { | |
eventData = eventData || {}; | |
var e = $.extend({}, $.Event(eventName), eventData); | |
if(eventData.keyCode){ | |
e.which = eventData.keyCode; | |
} | |
element.trigger(e); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment