<commit_before>/*global describe:true, it:true, expect: true, Backbone: true, beforeEach: true, chai:true*/
/*jshint expr:true */

describe("Elements object", function(){

  var View = Backbone.ViewMaster.extend({
    elements: {
      "title": "h1",
      "items": "li"
    },

    template: function() {
      return "<h1>Elements test</h1><ul><li>first</li><li>second</li><ul>";
    }

  });

  it("fetches elements to view instance after render", function(){
    var view = new View();
    expect(view.title).to.be.not.ok;
    view.render();

    expect(view.title).to.be.ok;
    expect(view.title.text()).to.eq("Elements test");

    expect(view.items.size()).to.eq(2);

  });


});<commit_msg>Clean up elements test<commit_after>/*global describe:true, it:true, expect: true, Backbone: true, beforeEach: true, chai:true*/
/*jshint expr:true */

describe("Elements object", function(){

  var View = Backbone.ViewMaster.extend({
    elements: {
      "$title": "h1",
      "$items": "li"
    },

    template: function() {
      return "<h1>Elements test</h1><ul><li>first</li><li>second</li><ul>";
    }

  });

  it("fetches elements to view instance after render", function(){
    var view = new View();
    expect(view.$title).to.be.not.ok;
    view.render();

    expect(view.$title).to.be.ok;
    expect(view.$title.text()).to.eq("Elements test");

    expect(view.$items.size()).to.eq(2);

  });


});
{'fraction_non_alphanumeric': 0.2024062278839349, 'fraction_numerical': 0.005661712668082095, 'mean_word_length': 3.41875, 'pattern_counts': {'":': 4, '<': 19, '<?xml version=': 0, '>': 19, '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': '2322503', 'n_tokens_mistral': 490, 'n_tokens_neox': 471, 'n_words': 95}