title: Unit testing Polymer listener that uses this.fire
body: <p>I have a Polymer element that is set up something like this: </p>
  
  <pre><code>Polymer({
  
    is: 'some-element',
  
  
    properties: {
      //properties
    },
  
    listeners: {
      'something-happened': '_onSomethingHappening'
    },
    someFunction: function() {},
  
    anotherFunction: function() { // something-happened listener is executed here},
  
    _onSomethingHappening: function(e) {
        this.fire('it-happened', {e.someInfo});
    }
  })
  </code></pre>
  
  <p>I have unit tested all functions, but I need to test for the _onSomethingHappening event. I try to capture the return value of the this.fire event, but this doesn't work. The unit test I have in mind is something like this: </p>
  
  <pre><code>test('_onSomethingHappened', function() {
  
      var ev = some-element._onSomethingHappened();
      assert(typeof ev, 'object');
  
  });
  </code></pre>
  
  <p>The thing is, when I do this, it says that no event was passed to the listener, so therefore the test fails. Is there a way I could structure this test to make it work? Is there a way to say "assert that a JS .fire event was executed"? </p>