Is there any way to mock the RowNodes of AG-grid in unit test?
I need to check if
forEachNode
a function call gets executed with the RowNode as a parameter and then test the conditional branches.
Below is my sample code
func1() {
agGrid.api.forEachNode(node => func2(node));
}
func2(node: RowNode) {
serviceCall.subscribe(
(returnValue) => {
node.setDataValue('f1', returnValue.p1);
},
() => {
node.setDataValue('
f1', '');
}
);
}
Thanks,
Rashmi