<commit_before><commit_msg>Add test for types of event name - strings, case insensitive and constructor level for event objects<commit_after>TestCase("stringEventNames", {

   "test can use strings to fire events":function () {
      var sub = new Subscribable();
      var stubHandler = sinon.spy(function() {});

      sub.on('namedEvent', stubHandler);
      sub.fire('NamedEvent');
      assertEquals(1, stubHandler.callCount);
   },

   "test can use any case of string":function () {
      var sub = new Subscribable();
      var stubHandler = sinon.spy(function() {});

      sub.on('namedEvent', stubHandler);
      sub.fire('NAMEDEvent');
      assertEquals(1, stubHandler.callCount);
   },

   "test can use an object that has a constructor level toString that returns an event name":function () {
      function SomeEvent() {}
      SomeEvent.toString = function() {
         return 'namedEvent';
      };

      var sub = new Subscribable();
      var stubHandler = sinon.spy(function() {});

      sub.on('NamedEvent', stubHandler);
      sub.fire( SomeEvent );
      assertEquals(1, stubHandler.callCount);
   }

});
{'fraction_non_alphanumeric': 0.12743362831858407, 'fraction_numerical': 0.002654867256637168, 'mean_word_length': 3.1580882352941178, 'pattern_counts': {'":': 3, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4379761', 'n_tokens_mistral': 316, 'n_tokens_neox': 308, 'n_words': 89}