(root: Construct)
| 384 | const stack = new TestStack(); |
| 385 | |
| 386 | const validateTree = (root: Construct) => { |
| 387 | const errors: ValidationError[] = []; |
| 388 | for (const child of root.node.children) { |
| 389 | errors.push(...validateTree(child)); |
| 390 | } |
| 391 | |
| 392 | errors.push(...root.node.validate().map(message => ({ source: root, message }))); |
| 393 | return errors; |
| 394 | }; |
| 395 | |
| 396 | const errors = validateTree(stack) |
| 397 | .map((v: ValidationError) => ({ path: v.source.node.path, message: v.message })); |
no test coverage detected
searching dependent graphs…