import * as cdk from '@aws-cdk/core' ; import { SynthUtils } from '@aws-cdk/assert' ; import * as db from '../lib/dashboard-stack' ; import * as sqs from '@aws-cdk/aws-sqs' ; import { RunType } from '../lib/main-stack' ; test ( 'Test dashboard stack' , ( ) => { const stack = new cdk . Stack ( ) ; new db . DashboardStack ( stack , 'MyTestDashboardStack' , { runType : RunType . EC2 , queue : new sqs . Queue ( stack , 'TestQueue' ) , asgName : 'TestASG' , } ) ; expect ( SynthUtils . toCloudFormation ( stack ) ) . toMatchSnapshot ( ) ; } ) ;