<commit_before>window.scrollY = 100;
window.scrollX = 100;

QUnit.module('getWindowRect');

QUnit.test('Returns correct object if no offset is set', function(assert){
  var result = ventana.getWindowRect();
  assert.equal(result.top, 100, 'top should equal scrolled Y position');
  assert.equal(result.left, 100, 'left should equal scrolled x position');
  assert.equal(result.width, window.innerWidth, 'width should equal innerWidth');
  assert.equal(result.height, window.innerHeight, 'height should equal innerHeight');
});

QUnit.test('Returns correct object when offset is set', function(assert){
  var result = ventana.getWindowRect({
    top: 5
  });
  assert.equal(result.top, window.scrollY + 5, 'top should equal scrollY + offset');
});<commit_msg>Fix test<commit_after>QUnit.module('getWindowRect');

QUnit.test('Returns correct object if no offset is set', function(assert){
  assert.expect(4);
  var done = assert.async();
  ventana.queue(function() {
    var result = ventana.getWindowRect();
    assert.equal(result.top, 0, 'top should equal scrolled Y position');
    assert.equal(result.left, 0, 'left should equal scrolled x position');
    assert.equal(result.width, window.innerWidth, 'width should equal innerWidth');
    assert.equal(result.height, window.innerHeight, 'height should equal innerHeight');
    done();
  });
});

QUnit.test('Returns correct object when offset is set', function(assert){
  var result = ventana.getWindowRect({
    top: 5
  });
  assert.equal(result.top, 5, 'top should equal scrollY + offset');
});
{'fraction_non_alphanumeric': 0.13668600902643455, 'fraction_numerical': 0.012250161186331399, 'mean_word_length': 5.015503875968992, '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': '6059760', 'n_tokens_mistral': 474, 'n_tokens_neox': 455, 'n_words': 134}