<<<<<<< 0747803d2a834e3bcbdc8ece3dc92df05fb74c86
import { expect } from 'chai';
import { Tracker } from '../src';
=======
const { Tracker } = Sentinel;

/* Shorthand callback declaration */
function callback(done, isTracked) {
  return function ({ DOMElement }) {
    DOMElement.classList.add('tracked');

    if (!isTracked) {
      isTracked = true;
      return done();
    }
  }
}

/* Disable throttling to align with continuous scrolling */
const throttle = 0;
let timer;
let isTracked = false;
>>>>>>> Tests: Provide basic test setup and a few Absolute tracking tests

describe('Tracker', () => {
  before() => {
    window.scrollTo(0, 0);
    document.getElementById('container').innerHTML = '';
    timer = setInterval(() => window.scrollBy(0, 50), 50);
  });

  after(() => clearInterval(timer));
  afterEach(() => isTracked = false);

  it('Should not be undefined', () => expect(Tracker).to.not.be.undefined);

  /**
   * Absolute tracking
   */
  describe('Absolute tracking', () => {
    it('Should track relatively to the window', (done) => {
      new Tracker({
        throttle,
        targets: document.getElementById('target-absolute'),
        snapshots: [
          { callback: callback(done, isTracked) }
        ]
      });
    });
  });

  /**
   * Realtive tracking
   */
  describe('Relative tracking', () => {
    it('Should track relatively to the bounds', (done) => {
      const targetWithin = document.getElementById('target-relative-within');

      new Tracker({
        throttle,
        targets: document.getElementsByClassName('target-relative'),
        bounds: document.getElementById('target-relative-bounds'),
        snapshots: [
          {
            callback: ({ DOMElement, pool }) => {
              expect(pool[0]).to.have.length(1);
              expect(pool[0]).to.include(targetWithin);

              const fn = callback(done, isTracked);
              return fn({ DOMElement });
            }
          }
        ]
      })
    });
  });
});

@@ -1,53 +1,4 @@
-%3C%3C%3C%3C%3C%3C%3C 0747803d2a834e3bcbdc8ece3dc92df05fb74c86%0A
 impo
@@ -61,468 +61,8 @@
 rc';
-%0A=======%0Aconst %7B Tracker %7D = Sentinel;%0A%0A/* Shorthand callback declaration */%0Afunction callback(done, isTracked) %7B%0A  return function (%7B DOMElement %7D) %7B%0A    DOMElement.classList.add('tracked');%0A%0A    if (!isTracked) %7B%0A      isTracked = true;%0A      return done();%0A    %7D%0A  %7D%0A%7D%0A%0A/* Disable throttling to align with continuous scrolling */%0Aconst throttle = 0;%0Alet timer;%0Alet isTracked = false;%0A%3E%3E%3E%3E%3E%3E%3E Tests: Provide basic test setup and a few Absolute tracking tests
 %0A%0Ade

Test (Tracker): Solve merge conflicts