goes to the beginning1ms ‣
carousel.scrollFromLeft = 0;
expect(carousel.scrollFromLeft === 0).to.be.true;
expect(carousel.scrollFromRight === 0).to.be.false;
expect(carousel.index).to.equal(0);
goes to the end0ms ‣
carousel.scrollFromRight = 0;
expect(carousel.scrollFromLeft === 0).to.be.false;
expect(carousel.scrollFromRight === 0).to.be.true;
expect(carousel.index).to.equal(9);
scroll from left1ms ‣
carousel.scrollFromLeft = 400;
expect(carousel.scrollFromLeft).to.equal(400);
expect(carousel.scrollFromRight).to.equal(3000);
expect(carousel.index).to.equal(1);
advance scroll from left1ms ‣
carousel.scrollFromLeft += carousel.clientWidth;
expect(carousel.scrollFromLeft).to.equal(1000);
expect(carousel.scrollFromRight).to.equal(2400);
expect(carousel.index).to.equal(3);
scroll from right1ms ‣
carousel.scrollFromRight = 400;
expect(carousel.scrollFromLeft).to.equal(3000);
expect(carousel.scrollFromRight).to.equal(400);
expect(carousel.index).to.equal(8);