<commit_before>describe('media header tests', function () {
  'use strict';
  var MediaHeaderView, Content, myHeader, Backbone;
  // var should = chai.should();

  beforeEach(function (done) {
    this.timeout(10000);

    require(['cs!modules/media/header/header', 'cs!models/content', 'backbone'], function () {
      MediaHeaderView = arguments[0];
      Content = arguments[1];
      Backbone = arguments[2];

      var cont = new Content();
      cont.set({
        'title': 'Book',
        'currentPage': {
          'title': 'Chapter'
        }
      });
      cont.get('currentPage').get('title');
      myHeader = new MediaHeaderView({
        'model': cont
      });
      done();
    });
  });
  describe('title update test', function () {
    it('should include the title and page name in title', function () {
      myHeader.updateTitle();
      myHeader.pageTitle.should.equal('Book - Chapter');
    });
  });
});
<commit_msg>fixed tests<commit_after>describe('media header tests', function () {
  'use strict';
  var MediaHeaderView, Content, myHeader, Backbone;
  // var should = chai.should();

  beforeEach(function (done) {
    this.timeout(10000);

    require(['cs!modules/media/header/header', 'cs!models/content', 'backbone'], function () {
      MediaHeaderView = arguments[0];
      Content = arguments[1];
      Backbone = arguments[2];

      var model = new Content();
      model.set('title', 'Book');
      var curPage = (new Content()).asPage();
      curPage.set('title', 'Chapter');
      model.set('currentPage', curPage);
      myHeader = new MediaHeaderView({
        'model': model
      });
      done();
    });
  });
  describe('title update test', function () {
    it('should include the title and page name in title when updateTitle is called', function () {
      myHeader.updateTitle();
      myHeader.pageTitle.should.equal('Book - Chapter');
    });
    it('should automatically call updateTitle when currentPage changes', function () {
      var newCurPage = new Content();
      newCurPage.set('title', 'New Chapter');
      myHeader.model.set('currentPage', newCurPage);
      myHeader.pageTitle.should.equal('Book - New Chapter');
    });
  });
});

{'fraction_non_alphanumeric': 0.16045454545454546, 'fraction_numerical': 0.007272727272727273, 'mean_word_length': 2.98731884057971, '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': '5704121', 'n_tokens_mistral': 638, 'n_tokens_neox': 619, 'n_words': 150}