import * as cdk from '@aws-cdk/core' ; import { SynthUtils } from '@aws-cdk/assert' ; import * as finder from '../lib/ecs-finder-stack' ; import * as ec2 from '@aws-cdk/aws-ec2' ; test ( 'Test ECS finder stack' , ( ) => { const stack = new cdk . Stack ( ) ; new finder . EcsStack ( stack , 'MyTestFinderStack' , { env : { 'SRC_BUCKET' : 'test-src' , } , vpc : new ec2 . Vpc ( stack , 'TestVpc' ) , ecsSubnetIds : [ 'subnet-1' , 'subnet-2' ] , ecsClusterName : 'TestCluster' , cliRelease : 'v1.0.0' , } ) ; expect ( SynthUtils . toCloudFormation ( stack ) ) . toMatchSnapshot ( ) ; } ) ;