MCPcopy Create free account
hub / github.com/aws/constructs / validateTree

Function validateTree

test/construct.test.ts:431–439  ·  view source on GitHub ↗
(root: Construct)

Source from the content-addressed store, hash-verified

429 const stack = new TestStack();
430
431 const validateTree = (root: Construct) => {
432 const errors: ValidationError[] = [];
433 for (const child of root.node.children) {
434 errors.push(...validateTree(child));
435 }
436
437 errors.push(...root.node.validate().map(message => ({ source: root, message })));
438 return errors;
439 };
440
441 const errors = validateTree(stack)
442 .map((v: ValidationError) => ({ path: v.source.node.path, message: v.message }));

Callers 1

construct.test.tsFile · 0.85

Calls 1

validateMethod · 0.65

Tested by

no test coverage detected