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

Function createTree

test/construct.test.ts:692–709  ·  view source on GitHub ↗
(context?: any)

Source from the content-addressed store, hash-verified

690});
691
692function createTree(context?: any) {
693 const root = new Root();
694 const highChild = new Construct(root, 'HighChild');
695 if (context) {
696 Object.keys(context).forEach(key => highChild.node.setContext(key, context[key]));
697 }
698
699 const child1 = new Construct(highChild, 'Child1');
700 const child2 = new Construct(highChild, 'Child2');
701 const child1_1 = new Construct(child1, 'Child11');
702 const child1_2 = new Construct(child1, 'Child12');
703 const child1_1_1 = new Construct(child1_1, 'Child111');
704 const child2_1 = new Construct(child2, 'Child21');
705
706 return {
707 root, child1, child2, child1_1, child1_2, child1_1_1, child2_1,
708 };
709}
710
711class MyBeautifulConstruct extends Construct {
712 constructor(scope: Construct, id: string) {

Callers 1

construct.test.tsFile · 0.85

Calls 1

setContextMethod · 0.80

Tested by

no test coverage detected