<commit_before>/* global addHeadingAnchors:false */

var assert = chai.assert;

describe("popovers", function () {
  var NUM_HEADINGS = 6; // would be const, but you know.

  before(function () {
    this.testArea = document.getElementById("test-popovers");
    addHeadingAnchors.init("#test-popovers", "#test-popovers .popovers");
    this.clipboardAnchors = this.testArea.querySelectorAll("a[data-clipboard-text]");
  });

  it("creates the popover html when we 'click' each share button", function () {
    var popoverChildCount = 0;

    this.clipboardAnchors.forEach(function assertClickCreatesPopover(anchor) {
      anchor.click();
    });

    popoverChildCount = this.testArea.querySelector(".popovers").children.length;

    assert.equal(popoverChildCount, NUM_HEADINGS);
  });

});

<commit_msg>rearrange test case so I can test the timer without using fake timers for everything<commit_after>/* global addHeadingAnchors:false sinon:false */

var assert = chai.assert;

describe("popovers", function () {
  var NUM_HEADINGS = 6; // would be const, but you know.

  before(function () {
    this.testArea = document.getElementById("test-popovers");
    addHeadingAnchors.init("#test-popovers", "#test-popovers .popovers");
    this.clipboardAnchors = this.testArea.querySelectorAll("a[data-clipboard-text]");
  });

  it("creates the popover html when we 'click' each share button", function () {
    var popoverChildCount = 0;

    this.clipboardAnchors.forEach(function assertClickCreatesPopover(anchor) {
      anchor.click();
    });

    popoverChildCount = this.testArea.querySelector(".popovers").children.length;

    assert.equal(popoverChildCount, NUM_HEADINGS);
  });

  describe("mocked timer cases", function () {

    beforeEach(function () {
      this.clock = sinon.useFakeTimers();
    });

    afterEach(function () {
      this.clock.restore();
    });


    it("displays the popover, which then fades when the input is blurred", function () {

    });

  });

});
{'fraction_non_alphanumeric': 0.13697942799799298, 'fraction_numerical': 0.002007024586051179, 'mean_word_length': 4.0226700251889165, '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': '4984495', 'n_tokens_mistral': 638, 'n_tokens_neox': 600, 'n_words': 128}