Skip to content

Commit af27bf6

Browse files
committed
Add test
1 parent 6523cc0 commit af27bf6

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packages/aws-cdk/test/api/util/checks.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ describe('determineAllowCrossAccountAssetPublishing', () => {
5050
expect(result).toBe(true);
5151
});
5252

53+
it('should return true if looking up the bootstrap stack fails', async () => {
54+
AWSMock.mock('CloudFormation', 'describeStacks', (_params: any, callback: Function) => {
55+
callback(new Error('Could not read bootstrap stack'));
56+
});
57+
58+
const result = await determineAllowCrossAccountAssetPublishing(mockSDK);
59+
expect(result).toBe(true);
60+
});
61+
5362
it('should return false for other scenarios', async () => {
5463
AWSMock.mock('CloudFormation', 'describeStacks', (_params: any, callback: Function) => {
5564
callback(null, {

0 commit comments

Comments
 (0)