()
| 157 | |
| 158 | describe('should correctly use the differ to add/remove/move rows', () => { |
| 159 | function addInitialIndexAttribute() { |
| 160 | // Each row receives an attribute 'initialIndex' the element's original place |
| 161 | getRows(tableElement).forEach((row: Element, index: number) => { |
| 162 | row.setAttribute('initialIndex', index.toString()); |
| 163 | }); |
| 164 | |
| 165 | // Prove that the attributes match their indicies |
| 166 | const initialRows = getRows(tableElement); |
| 167 | expect(initialRows[0].getAttribute('initialIndex')).toBe('0'); |
| 168 | expect(initialRows[1].getAttribute('initialIndex')).toBe('1'); |
| 169 | expect(initialRows[2].getAttribute('initialIndex')).toBe('2'); |
| 170 | } |
| 171 | |
| 172 | it('when the data is heterogeneous', () => { |
| 173 | addInitialIndexAttribute(); |
no test coverage detected