<commit_before>const dimOverrides = require('dimOverrides.js');
const postal = require('postal');

describe('DIM Overrides', function() {

  describe('when a refresh occurs', function() {

    beforeEach(function() {
      loadFixtures(
        'kineticWeapon.html',
        'energyWeapon.html',
        'powerWeapon.html',
        'chestArmor.html'
      );
    });

    it('should remove all weapon tags tag', function() {
      expect($('[drag-channel=Kinetic],[drag-channel=Energy],[drag-channel=Power]').children('.item-tag').length).toBe(3);
      postal.publish({topic:'foaf.refresh'});
      expect($('[drag-channel=Kinetic],[drag-channel=Energy],[drag-channel=Power]').children('.item-tag').length).toBe(0);
    });

    it('should leave other tags alone', function() {
      expect($('[drag-channel=Chest]').children('.item-tag').length).toBe(1);
      postal.publish({topic:'foaf.refresh'});
      expect($('[drag-channel=Chest]').children('.item-tag').length).toBe(1);
    });
  });
});
<commit_msg>Move dependencies within the spec<commit_after>describe('DIM Overrides', function() {

  const dimOverrides = require('dimOverrides.js');
  const postal = require('postal');

  describe('when a refresh occurs', function() {

    beforeEach(function() {
      loadFixtures(
        'kineticWeapon.html',
        'energyWeapon.html',
        'powerWeapon.html',
        'chestArmor.html'
      );
    });

    it('should remove all weapon tags tag', function() {
      expect($('[drag-channel=Kinetic],[drag-channel=Energy],[drag-channel=Power]').children('.item-tag').length).toBe(3);
      postal.publish({topic:'foaf.refresh'});
      expect($('[drag-channel=Kinetic],[drag-channel=Energy],[drag-channel=Power]').children('.item-tag').length).toBe(0);
    });

    it('should leave other tags alone', function() {
      expect($('[drag-channel=Chest]').children('.item-tag').length).toBe(1);
      postal.publish({topic:'foaf.refresh'});
      expect($('[drag-channel=Chest]').children('.item-tag').length).toBe(1);
    });
  });
});

{'fraction_non_alphanumeric': 0.20821114369501467, 'fraction_numerical': 0.0039100684261974585, 'mean_word_length': 3.956416464891041, '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': '2749049', 'n_tokens_mistral': 653, 'n_tokens_neox': 629, 'n_words': 82}