<commit_before>describe("Moments", function() {
  var NO_ALLIES = "Unselect all";
  var ALL_ALLIES = "Select all";
  beforeAll(function() {
    $("body")
    .prepend(
      $("<div>")
      .attr("id", "test_body")
      .append(
        $('<label>')
        .attr("id", "viewers_label")
      )
    )
    onReadyStrategies();
  });
  afterAll(function() {
    $("#test_body").remove();
    $("body").removeClass("moments new");
  });
  it("test no functions called", function() {
    var spy = spyOn(window, "newOrEdit");
    expect(spy).not.toHaveBeenCalled();
  });
	it("test onReadyMoments to be called", function() {
    var spy = spyOn(window, "newOrEdit");
    onReadyMoments();
    expect(spy).toHaveBeenCalled();
    expect($('#viewers_label').text()).toBe("");
  });
  it("test onReadyMoments and newOrEdit to be called", function() {
    $("body").addClass("moments new");
    onReadyMoments();
    expect($('#viewers_label').text()).toBe(ALL_ALLIES);
    onReadyMoments();
  });
  it("test newOeEdit in onReadyMoments to be called", function() {
    var spy = spyOn(window, "newOrEdit");
    onReadyMoments();
    expect(spy).toHaveBeenCalled();
  });
});<commit_msg>#180 | Refactor variable names in moments.spec.js to increase readability<commit_after>describe("Moments", function() {
  var NO_ALLIES = "Unselect all";
  var ALL_ALLIES = "Select all";
  beforeAll(function() {
    $("body")
    .prepend(
      $("<div>")
      .attr("id", "test_body")
      .append(
        $('<label>')
        .attr("id", "viewers_label")
      )
    )
    onReadyStrategies();
  });
  afterAll(function() {
    $("#test_body").remove();
    $("body").removeClass("moments new");
  });
  it("test no functions called", function() {
    var newOrEdit = spyOn(window, "newOrEdit");
    expect(newOrEdit).not.toHaveBeenCalled();
  });
	it("test onReadyMoments to be called", function() {
    var newOrEdit = spyOn(window, "newOrEdit");
    onReadyMoments();
    expect(newOrEdit).toHaveBeenCalled();
    expect($('#viewers_label').text()).toBe("");
  });
  it("test onReadyMoments and newOrEdit to be called", function() {
    $("body").addClass("moments new");
    onReadyMoments();
    expect($('#viewers_label').text()).toBe(ALL_ALLIES);
    onReadyMoments();
  });
  it("test newOeEdit in onReadyMoments to be called", function() {
    var newOrEdit = spyOn(window, "newOrEdit");
    onReadyMoments();
    expect(newOrEdit).toHaveBeenCalled();
  });
});
{'fraction_non_alphanumeric': 0.19299674267100977, 'fraction_numerical': 0.0012214983713355048, 'mean_word_length': 3.7432432432432434, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '7535885', 'n_tokens_mistral': 840, 'n_tokens_neox': 823, 'n_words': 158}