<commit_before>describe('detached DOM node', function() {
  var visible = false;
  var test = createTest();

  before(function() {
    inViewport(test, function() {
      visible = true;
    });
  });

  it('callback not called', function() {
    assert(visible === false);
  });

  describe('when we insert it into DOM', function() {

    before(function() {
      insertTest(test);
    });

    before(wait(50));

    it('callback still not called', function() {
      // because no event (scroll) triggered a watch
      assert(visible === false);
    });
  });

  describe('when we scroll a little', function() {
    before(scroller(0, 1));
    before(scroller(0, 0));

    it('callback was called', function() {
      assert(visible === true);
    })
  });

  // after(clean(test));
});<commit_msg>clean detached test<commit_after>describe('detached DOM node', function() {
  var visible = false;
  var test = createTest();

  before(function() {
    inViewport(test, function() {
      visible = true;
    });
  });

  it('callback not called', function() {
    assert(visible === false);
  });

  describe('when we insert it into DOM', function() {

    before(function() {
      insertTest(test);
    });

    before(wait(50));

    it('callback still not called', function() {
      // because no event (scroll) triggered a watch
      assert(visible === false);
    });
  });

  describe('when we scroll a little', function() {
    before(scroller(0, 1));
    before(scroller(0, 0));

    it('callback was called', function() {
      assert(visible === true);
    })
  });

  after(clean(test));
});
{'fraction_non_alphanumeric': 0.1740211311373524, 'fraction_numerical': 0.0074580484773151025, 'mean_word_length': 3.025, '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': '62246', 'n_tokens_mistral': 495, 'n_tokens_neox': 467, 'n_words': 126}