| 11 | |
| 12 | const expected = {width: 600, total: 10000}; |
| 13 | function snapshot() { |
| 14 | return { |
| 15 | width: 600, |
| 16 | contentWidth: 598, |
| 17 | height: 300, |
| 18 | scrollTop: 1000, |
| 19 | rows: [ |
| 20 | {id: 'item-10', index: 10, top: -20, height: 60, allocatedHeight: 60, width: 598}, |
| 21 | {id: 'item-11', index: 11, top: 40, height: 100, allocatedHeight: 100, width: 598}, |
| 22 | {id: 'item-12', index: 12, top: 140, height: 80, allocatedHeight: 80, width: 598}, |
| 23 | {id: 'item-13', index: 13, top: 220, height: 100, allocatedHeight: 100, width: 598} |
| 24 | ] |
| 25 | }; |
| 26 | } |
| 27 | |
| 28 | test('a measured variable-height window fills the viewport without rendering the whole dataset', () => { |
| 29 | assert.equal(validLayout(snapshot(), expected), true); |