function checkViewportFillup()

in spec/index.js [145:161]


  function checkViewportFillup() {
    const items = $('.test-container > .internal-viewport > ul > li');
    const [rectFirst, rectLast] = [
      items.first(),
      items.last(),
    ].map($el => $el.get(0).getBoundingClientRect());
    const { top, bottom } = viewportMetrics().outer;

    if (listView.indexFirst > 0) {
      expect(rectFirst.top).to.be.at.most(top);
    }
    if (listView.indexLast < listView.options.items.length) {
      expect(rectLast.bottom).to.be.at.least(bottom);
    }

    return null;
  }