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

Function createTree

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

Source from the content-addressed store, hash-verified

735});
736
737function createTree(context?: any) {
738 const root = new Root();
739 const highChild = new Construct(root, 'HighChild');
740 if (context) {
741 Object.keys(context).forEach(key => highChild.node.setContext(key, context[key]));
742 }
743
744 const child1 = new Construct(highChild, 'Child1');
745 const child2 = new Construct(highChild, 'Child2');
746 const child1_1 = new Construct(child1, 'Child11');
747 const child1_2 = new Construct(child1, 'Child12');
748 const child1_1_1 = new Construct(child1_1, 'Child111');
749 const child2_1 = new Construct(child2, 'Child21');
750
751 return {
752 root, child1, child2, child1_1, child1_2, child1_1_1, child2_1,
753 };
754}
755
756class MyBeautifulConstruct extends Construct {
757 constructor(scope: Construct, id: string) {

Callers 1

construct.test.tsFile · 0.85

Calls 1

setContextMethod · 0.80

Tested by

no test coverage detected