0

How to write test cases for a function which is returning another lamda function in angular ?

mapAsset (nodes, displayName: Array<string>) { return nodes.map(({ children, ...child }: any) => { const names = [...displayName, child.name]; Return { ... child, displayName : names , children : this.mapAsset ( children || [] , [ ...names] ) , }; }); }

31st Mar 2022, 8:01 AM
Developer
2 Answers