I'm trying to write qUnit tests based around the selection of an option. However, adding a click event to the specific option doesn't work, so I've been trying to use the .change() event, but when there's more than one, I get a call stack error like this:
Maximum call stack size exceeded
Here's my unit Test:
test( "Testing", function() {
$('#target_select').val(5);
$('#target_select').change();
$('#target_select').val(6);
$('#target_select').change();
equal($('#some_target').is(':disabled'), true, "It's disabled, man" );
});
So my question is how do I either accurately simulate this event, or how do I stop this from happening? If I use only one event, the tests aren't accurate.