<commit_before>describe('Dismiss:', function() {
  beforeEach(function() {
    loadFixtures('dismiss_fixture.html');
    locastyle.dismiss.init();
  });

  describe("When click on [data-ls-module=dismiss]", function() {
    it("should dismiss the parent .ls-dismissable", function() {
      $('#dismiss-test [data-ls-module=dismiss]').trigger('click');
      expect($('#dismiss-test')).toHaveClass('ls-dismissed');
    });

    it("should dismiss the target if target is given", function() {
      $('#dismiss-test-2').trigger('click');
      expect($('#dismissable-2')).toHaveClass('ls-dismissed');
    });
  });
<commit_msg>add test for event trigger<commit_after>describe('Dismiss:', function() {
  beforeEach(function() {
    loadFixtures('dismiss_fixture.html');
    locastyle.dismiss.init();
  });

  describe("When click on [data-ls-module=dismiss]", function() {
    it("should dismiss the parent .ls-dismissable", function() {
      $('#dismiss-test [data-ls-module=dismiss]').trigger('click');
      expect($('#dismiss-test')).toHaveClass('ls-dismissed');
    });

    it("should dismiss the target if target is given", function() {
      $('#dismiss-test-2').trigger('click');
      expect($('#dismissable-2')).toHaveClass('ls-dismissed');
    });

    it("should trigger the event dismiss:close", function() {
      var spyEvent = spyOnEvent('.ls-dismissable', 'dismiss:close');
      $('[data-ls-module="dismiss"]').trigger('click');
      expect('dismiss:close').toHaveBeenTriggeredOn('.ls-dismissable');
    });
  });

{'fraction_non_alphanumeric': 0.20482713633398564, 'fraction_numerical': 0.002609262883235486, 'mean_word_length': 4.307958477508651, 'pattern_counts': {'":': 0, '<': 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': '3376131', 'n_tokens_mistral': 481, 'n_tokens_neox': 455, 'n_words': 76}