<commit_before>describe('Scroll View', function() {
  var sc;
  beforeEach(function() {
    sc = document.createElement('scroll-content');
    s = document.createElement('scroll');
    sc.appendChild(s);
  });

  it('Should init', function() {
    var sv = new ionic.views.ScrollNative({
      el: sc
    });
  });

  it('Should bind to event listeners', function() {
    spyOn(sc,'addEventListener');
    spyOn(document,'addEventListener');
    var sv = new ionic.views.ScrollNative({
      el: sc
    });

    expect(document.addEventListener).toHaveBeenCalled();
    expect(document.addEventListener.mostRecentCall.args[0]).toBe('resetScrollView');
    expect(sc.addEventListener).toHaveBeenCalled();
    expect(sc.addEventListener.callCount).toBe(2);
    expect(sc.addEventListener.mostRecentCall.args[0]).toBe('scrollChildIntoView');
  });

  it('Should remove event listeners on cleanup', function() {
    spyOn(sc,'removeEventListener');
    var sv = new ionic.views.ScrollNative({
      el: sc
    });
    sv.__cleanup();

    expect(sc.removeEventListener).toHaveBeenCalled();
    expect(sc.removeEventListener.callCount).toBe(4);
    expect(sc.removeEventListener.mostRecentCall.args[0]).toBe('resetScrollView');
  });

});
<commit_msg>Really properly clean oneself<commit_after>describe('Scroll View', function() {
  var sc;
  beforeEach(function() {
    sc = document.createElement('scroll-content');
    s = document.createElement('scroll');
    sc.appendChild(s);
  });

  it('Should init', function() {
    var sv = new ionic.views.ScrollNative({
      el: sc
    });
  });

  it('Should bind to event listeners', function() {
    spyOn(sc,'addEventListener');
    spyOn(document,'addEventListener');
    var sv = new ionic.views.ScrollNative({
      el: sc
    });

    expect(document.addEventListener).toHaveBeenCalled();
    expect(document.addEventListener.mostRecentCall.args[0]).toBe('resetScrollView');
    expect(sc.addEventListener).toHaveBeenCalled();
    expect(sc.addEventListener.callCount).toBe(4);
    expect(sc.addEventListener.mostRecentCall.args[0]).toBe('scrollChildIntoView');
  });

  it('Should remove event listeners on cleanup', function() {
    spyOn(sc,'removeEventListener');
    var sv = new ionic.views.ScrollNative({
      el: sc
    });
    sv.__cleanup();

    expect(sc.removeEventListener).toHaveBeenCalled();
    expect(sc.removeEventListener.callCount).toBe(6);
    expect(sc.removeEventListener.mostRecentCall.args[0]).toBe('resetScrollView');
  });

});

{'fraction_non_alphanumeric': 0.15550239234449761, 'fraction_numerical': 0.003987240829346092, 'mean_word_length': 4.2710084033613445, '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': '3300110', 'n_tokens_mistral': 726, 'n_tokens_neox': 711, 'n_words': 117}