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] ) , }; }); }
2 Answers