<commit_before>var mocha = require('../')
  , Suite = mocha.Suite;

describe('Suite', function() {
  describe('when initialized', function() {
    beforeEach(function() {
      this.suite = new Suite('A Suite');
    });

    it('is initialized with a title', function() {
      this.suite.title.should.equal('A Suite');
    });

    it('the suites array is empty', function() {
      this.suite.suites.length.should.equal(0);
    });

    it('the tests array is empty', function() {
      this.suite.tests.length.should.equal(0);
    });

    it('the _beforeEach array is empty', function() {
      this.suite._beforeEach.length.should.equal(0);
    });

    it('the _beforeAll array is empty', function() {
      this.suite._beforeEach.length.should.equal(0);
    });

    it('the _afterEach array is empty', function() {
      this.suite._afterEach.length.should.equal(0);
    });

    it('the _afterAll array is empty', function() {
      this.suite._afterAll.length.should.equal(0);
    });

    it('the root is false', function() {
      this.suite.root.should.equal(false);
    });

    it('the _timeout is 2000', function() {
      this.suite._timeout.should.equal(2000);
    });

    it('the _bail is false', function() {
      this.suite._bail.should.equal(false);
    });
  });

  describe('cloning', function() {
    beforeEach(function() {
      this.suite = new Suite('To be cloned');
      this.suite._timeout = 3043;
      this.suite._bail = true;
      this.suite.suites.push(1);
      this.suite.tests.push('hello');
      this.suite._beforeEach.push(2);
      this.suite._beforeAll.push(3);
      this.suite._afterEach.push(4);
      this.suite._afterAll.push(5);
    });

    describe('copies', function() {
      it('the title', function() {
        this.suite.clone().title.should.equal('To be cloned');
      });

      it('the timeout value', function() {
        this.suite.clone().timeout().should.equal(3043);
      });

      it('the bail value', function() {
        this.suite.clone().bail().should.equal(true);
      });
    });

    describe('does NOT copy', function() {
      it('the values from the suites array', function() {
        this.suite.clone().suites.length.should.equal(0);
      });

      it('the values from the tests array', function() {
        this.suite.clone().tests.length.should.equal(0);
      });

      it('the values from the _beforeEach array', function() {
        this.suite.clone()._beforeEach.length.should.equal(0);
      });

      it('the values from the _beforeAll array', function() {
        this.suite.clone()._beforeAll.length.should.equal(0);
      });

      it('the values from the _afterEach array', function() {
        this.suite.clone()._afterEach.length.should.equal(0);
      });

      it('the valurs from the _afterAll array', function() {
        this.suite.clone()._afterAll.length.should.equal(0);
      });
    });

  });
});<commit_msg>Fixing a typo in the spec<commit_after>var mocha = require('../')
  , Suite = mocha.Suite;

describe('Suite', function() {
  describe('when initialized', function() {
    beforeEach(function() {
      this.suite = new Suite('A Suite');
    });

    it('is initialized with a title', function() {
      this.suite.title.should.equal('A Suite');
    });

    it('the suites array is empty', function() {
      this.suite.suites.length.should.equal(0);
    });

    it('the tests array is empty', function() {
      this.suite.tests.length.should.equal(0);
    });

    it('the _beforeEach array is empty', function() {
      this.suite._beforeEach.length.should.equal(0);
    });

    it('the _beforeAll array is empty', function() {
      this.suite._beforeEach.length.should.equal(0);
    });

    it('the _afterEach array is empty', function() {
      this.suite._afterEach.length.should.equal(0);
    });

    it('the _afterAll array is empty', function() {
      this.suite._afterAll.length.should.equal(0);
    });

    it('the root is false', function() {
      this.suite.root.should.equal(false);
    });

    it('the _timeout is 2000', function() {
      this.suite._timeout.should.equal(2000);
    });

    it('the _bail is false', function() {
      this.suite._bail.should.equal(false);
    });
  });

  describe('cloning', function() {
    beforeEach(function() {
      this.suite = new Suite('To be cloned');
      this.suite._timeout = 3043;
      this.suite._bail = true;
      this.suite.suites.push(1);
      this.suite.tests.push('hello');
      this.suite._beforeEach.push(2);
      this.suite._beforeAll.push(3);
      this.suite._afterEach.push(4);
      this.suite._afterAll.push(5);
    });

    describe('copies', function() {
      it('the title', function() {
        this.suite.clone().title.should.equal('To be cloned');
      });

      it('the timeout value', function() {
        this.suite.clone().timeout().should.equal(3043);
      });

      it('the bail value', function() {
        this.suite.clone().bail().should.equal(true);
      });
    });

    describe('does NOT copy', function() {
      it('the values from the suites array', function() {
        this.suite.clone().suites.length.should.equal(0);
      });

      it('the values from the tests array', function() {
        this.suite.clone().tests.length.should.equal(0);
      });

      it('the values from the _beforeEach array', function() {
        this.suite.clone()._beforeEach.length.should.equal(0);
      });

      it('the values from the _beforeAll array', function() {
        this.suite.clone()._beforeAll.length.should.equal(0);
      });

      it('the values from the _afterEach array', function() {
        this.suite.clone()._afterEach.length.should.equal(0);
      });

      it('the values from the _afterAll array', function() {
        this.suite.clone()._afterAll.length.should.equal(0);
      });
    });

  });
});
{'fraction_non_alphanumeric': 0.17372013651877133, 'fraction_numerical': 0.011262798634812287, 'mean_word_length': 2.6585518102372037, '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': '5471803', 'n_tokens_mistral': 1851, 'n_tokens_neox': 1774, 'n_words': 347}