Skip to content

Commit eb55e9c

Browse files
committed
Fix test file
1 parent 85263b7 commit eb55e9c

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

backend/src/iac/backend-stack.test.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,32 @@ describe('BackendStack', () => {
1010
let stagingTemplate: Template;
1111
let productionTemplate: Template;
1212

13-
beforeEach(() => {
13+
beforeAll(() => {
1414
app = new cdk.App();
15+
16+
// Common props for all stacks
1517
stackProps = {
16-
env: { account: '123456789012', region: 'us-east-1' },
18+
env: {
19+
account: '123456789012',
20+
region: 'us-east-1',
21+
},
1722
};
1823

19-
// Create both staging and production stacks for testing
24+
// Create staging stack
2025
stagingStack = new BackendStack(app, 'StagingStack', {
2126
...stackProps,
2227
environment: 'staging',
28+
cognitoClientId: 'test-client-id',
29+
cognitoUserPoolId: 'test-user-pool-id',
2330
});
2431
stagingTemplate = Template.fromStack(stagingStack);
2532

33+
// Create production stack
2634
productionStack = new BackendStack(app, 'ProductionStack', {
2735
...stackProps,
2836
environment: 'production',
37+
cognitoClientId: 'test-client-id',
38+
cognitoUserPoolId: 'test-user-pool-id',
2939
});
3040
productionTemplate = Template.fromStack(productionStack);
3141
});

0 commit comments

Comments
 (0)