(parent: TestData)
| 1115 | } |
| 1116 | |
| 1117 | function mutateChildren(parent: TestData) { |
| 1118 | // Swap first and second data in data array |
| 1119 | const copiedData = parent.children.slice(); |
| 1120 | const temp = copiedData[0]; |
| 1121 | copiedData[0] = copiedData[1]; |
| 1122 | copiedData[1] = temp; |
| 1123 | |
| 1124 | // Remove the third element |
| 1125 | copiedData.splice(2, 1); |
| 1126 | |
| 1127 | // Add new data |
| 1128 | parent.children = copiedData; |
| 1129 | parent.observableChildren.next(copiedData); |
| 1130 | component.dataSource.addChild(parent, false); |
| 1131 | } |
| 1132 | |
| 1133 | it('should add/remove/move children nodes with reference-based trackBy', () => { |
| 1134 | createTrackByTestComponent('reference'); |
no test coverage detected
searching dependent graphs…