Skip to content

Commit

Permalink
Add simple infra tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-bacca committed Mar 20, 2024
1 parent 5b7a37d commit 90acf61
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions infra/test/infra.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import * as cdk from 'aws-cdk-lib';
import { Template, Match } from 'aws-cdk-lib/assertions';
import * as Infra from '../lib/infra-stack';

test('SQS Queue and SNS Topic Created', () => {
test("Lambda and API Gateway Created", () => {
const app = new cdk.App();
// WHEN
const stack = new Infra.InfraStack(app, 'MyTestStack', {
const stack = new Infra.InfraStack(app, "MyTestStack", {
fullName: "test-test",
pascalCaseFullName: "TestTest",
applicationTag: "app-tag-test",
Expand All @@ -15,8 +15,8 @@ test('SQS Queue and SNS Topic Created', () => {

const template = Template.fromStack(stack);

// template.hasResourceProperties('AWS::SQS::Queue', {
// VisibilityTimeout: 300
// });
// template.resourceCountIs('AWS::SNS::Topic', 1);
template.hasResourceProperties("AWS::Lambda::Function", {
FunctionName: "test-test-function"
});
template.resourceCountIs("AWS::ApiGateway::Method", 1);
});

0 comments on commit 90acf61

Please sign in to comment.