<commit_before>import assert from 'assert';
import SpiesTeardown from './spies-teardown';
import ReactTester from '../../../src/index';

describe('spies teardown', () => {
  let tester;

  beforeEach(() => {
    tester = ReactTester
      .create()
      .use(SpiesTeardown);
  });

  describe('refresh spies each time should', () => {
    beforeEach(() => tester.addFlavour('LEMON', {}));

    it('allow normal spy behaviour on the first test pass', () => {
      const actual = tester.ComponentToUse.prototype.spiedOn.callCount;
      const expected = 1;

      assert(actual, expected);
    });

    it('allow normal spy behaviour on the second test pass', () => {
      const actual = tester.ComponentToUse.prototype.spiedOn.callCount;
      const expected = 1;

      assert(actual, expected);
    });
  });

  describe('should', () => {
    beforeEach(() => tester.addFlavour('CHOCOLATE', {}));

    it('add spies automatically', () => {
      const actual = tester.ComponentToUse.prototype.spiedOn.isSinonProxy;
      const expected = true;
      assert(actual, expected);
    });

    it('allow them to be unwrapped', () => {
      tester.teardown();
      const actual = typeof tester.ComponentToUse.prototype.spiedOn.isSinonProxy;
      const expected = 'undefined';

      assert(actual, expected);
    });
  });
});<commit_msg>fix spy teardown tests (as they were not asserting anything)<commit_after>import assert from 'assert';
import SpiesTeardown from './spies-teardown';
import ReactTester from '../../../src/index';

describe('spies teardown', () => {
  let tester;

  beforeEach(() => {
    tester = ReactTester
      .create()
      .use(SpiesTeardown);
  });

  describe('refresh spies each time should', () => {
    beforeEach(() => tester.addFlavour('LEMON', {}));

    it('allow normal spy behaviour on the first test pass', () => {
      const actual = tester.ComponentToUse.prototype.spiedOn.callCount;
      const expected = 1;

      assert.equal(actual, expected);
    });

    it('allow normal spy behaviour on the second test pass', () => {
      const actual = tester.ComponentToUse.prototype.spiedOn.callCount;
      const expected = 1;

      assert.equal(actual, expected);
    });
  });

  describe('should', () => {
    beforeEach(() => tester.addFlavour('CHOCOLATE', {}));

    it('add spies automatically', () => {
      const actual = tester.ComponentToUse.prototype.spiedOn.isSinonProxy;
      const expected = true;
      assert.equal(actual, expected);
    });

    it('allow them to be unwrapped', () => {
      tester.teardown();
      const actual = typeof tester.ComponentToUse.prototype.spiedOn.isSinonProxy;
      const expected = 'undefined';

      assert.equal(actual, expected);
    });
  });
});
{'fraction_non_alphanumeric': 0.15569297926518735, 'fraction_numerical': 0.0014550745725718443, 'mean_word_length': 3.1167664670658684, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 23, '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': '1886431', 'n_tokens_mistral': 849, 'n_tokens_neox': 798, 'n_words': 191}