(root: Construct)
| 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 })); |
no test coverage detected