test: create universal tests and rewrite nodes to have optional parameters for more code coverage
ref: N25B-362
This commit is contained in:
@@ -78,8 +78,10 @@ export function PhaseReduce(node: Node, nodes: Node[]) {
|
||||
.filter(([t]) => !nodesNotInPhase.includes(t))
|
||||
.map(([t]) => t);
|
||||
|
||||
// children nodes
|
||||
const childrenNodes = nodes.filter((node) => data.children.includes(node.id));
|
||||
// children nodes - make sure to check for empty arrays
|
||||
let childrenNodes: any[] = [];
|
||||
if (data.children)
|
||||
childrenNodes = nodes.filter((node) => data.children.includes(node.id));
|
||||
|
||||
// Build the result object
|
||||
const result: Record<string, unknown> = {
|
||||
|
||||
Reference in New Issue
Block a user