Skip to content

Commit

Permalink
Added unit test for AccountPrincipal constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
tejasmr committed May 18, 2022
1 parent 80bb437 commit 003c271
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/@aws-cdk/aws-iam/test/principals.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ test('AccountPrincipal can specify an organization', () => {
});
});

test('Passing non-string as accountId parameter in AccountPrincipal constructor should throw error', () => {
expect(() => new iam.AccountPrincipal(1234)).toThrowError('accountId should be of type string');
});

test('ServicePrincipal in agnostic stack generates lookup table', () => {
// GIVEN
const stack = new Stack();
Expand Down

0 comments on commit 003c271

Please sign in to comment.