<commit_before>var people, view;

module("the #each helper", {
  setup: function() {
    template = templateFor("{{#each people}}{{name}}{{/each}}");
    people = SC.A([{ name: "<NAME>" }, { name: "Annabelle" }]);

    view = SC.View.create({
      template: template,
      people: people
    });

    append(view);
  }
});

var template;
var templateFor = function(template) {
  return SC.Handlebars.compile(template);
};

var append = function(view) {
  SC.run(function() {
    view.appendTo('#qunit-fixture');
  });
};

var assertHTML = function(view, expectedHTML) {
  var html = view.$().html();
  html = html.replace(/<script[^>]*><\/script>/ig, '');

  equal(expectedHTML, html);
}

test("it renders the template for each item in an array", function() {
  assertHTML(view, "<NAME>");<commit_msg>Fixed tests for IE<commit_after>var people, view;

module("the #each helper", {
  setup: function() {
    template = templateFor("{{#each people}}{{name}}{{/each}}");
    people = SC.A([{ name: "<NAME>" }, { name: "Annabelle" }]);

    view = SC.View.create({
      template: template,
      people: people
    });

    append(view);
  }
});

var template;
var templateFor = function(template) {
  return SC.Handlebars.compile(template);
};

var append = function(view) {
  SC.run(function() {
    view.appendTo('#qunit-fixture');
  });
};

var assertHTML = function(view, expectedHTML) {
  var html = view.$().html();

  // IE 8 (and prior?) adds the \r\n
  html = html.replace(/<script[^>]*><\/script>/ig, '').replace(/[\r\n]/g, '');

  equal(html, expectedHTML);
}

test("it renders the template for each item in an array", function() {
  assertHTML(view, "<NAME>");
{'fraction_non_alphanumeric': 0.20514354066985646, 'fraction_numerical': 0.0005980861244019139, 'mean_word_length': 3.7663817663817665, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, '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': '4548585', 'n_tokens_mistral': 564, 'n_tokens_neox': 551, 'n_words': 130}