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

Class MyConstruct

test/construct.test.ts:347–353  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

345test('node.addValidation() can be implemented to perform validation, node.validate() will return errors', () => {
346
347 class MyConstruct extends Construct {
348 constructor(scope: Construct, id: string) {
349 super(scope, id);
350
351 this.node.addValidation({ validate: () => ['my-error1', 'my-error2'] });
352 }
353 }
354
355 class YourConstruct extends Construct {
356 constructor(scope: Construct, id: string) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected