title: Testing event handlers
body: <p>I have an event handler that modifies some global variable based on the click action. How can I test it? For example:</p>
  
  <pre><code>function initEvent() {
    function enable() {
      var arr = Context.get('arr');
      arr.push('aaa');
    };
    function disable() {
      var arr = Context.get('arr');
      arr.push('bbb');
    };
    $('#content').on('click', '#element', function () {
      if (this.checked) {
        enable();
      } else {
        disable();
      }
    });
  };
  </code></pre>
  
  <p>This is the function I am calling after the HTML has been rendered. It calls <code>enable()</code> and <code>disable()</code> functions based on the user action. I want to test these functions and check if they behave correctly. How can I do that?</p>