import { Template , Match } from '@aws-cdk/assertions' ; import * as cdk from '@aws-cdk/core' ; import * as NodeLambdaTimeviewer from '../lib/node-lambda-timeviewer-stack' ; test ( 'SQS Queue Created' , ( ) => { const app = new cdk . App ( ) ; const stack = new NodeLambdaTimeviewer . NodeLambdaTimeviewerStack ( app , 'MyTestStack' ) ; const template = Template . fromStack ( stack ) ; template . hasResourceProperties ( 'AWS::SQS::Queue' , { VisibilityTimeout : 300 } ) ; } ) ; test ( 'SNS Topic Created' , ( ) => { const app = new cdk . App ( ) ; const stack = new NodeLambdaTimeviewer . NodeLambdaTimeviewerStack ( app , 'MyTestStack' ) ; const template = Template . fromStack ( stack ) ; template . resourceCountIs ( 'AWS::SNS::Topic' , 1 ) ; } ) ;