Skip to content

Commit 0458fc0

Browse files
small refactor to keep Username capitalised
1 parent 3f1d411 commit 0458fc0

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • src/assertions/toContainUserWithAttributes

src/assertions/toContainUserWithAttributes/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { CognitoIdentityServiceProvider } from "aws-sdk";
33
import { testResult, TestResultOutput } from "utils/testResult";
44

55
export interface UserWithAttributes {
6-
username: string;
6+
Username: string;
77
address?: { [key: string]: unknown };
88
birthdate?: string;
99
email?: string;
@@ -33,7 +33,7 @@ export default {
3333
const user: CognitoIdentityServiceProvider.AdminGetUserResponse = await cognitoClient
3434
.adminGetUser({
3535
UserPoolId: userPoolId,
36-
Username: userWithAttributes.username,
36+
Username: userWithAttributes.Username,
3737
})
3838
.promise();
3939

@@ -53,14 +53,14 @@ export default {
5353
});
5454

5555
return testResult(
56-
`User with username ${userWithAttributes.username} exists in User Pool with Id ${userPoolId}`,
56+
`User with username ${userWithAttributes.Username} exists in User Pool with Id ${userPoolId}`,
5757
true
5858
);
5959
} catch (e) {
6060
console.log(e);
6161

6262
return testResult(
63-
`User does not exist in User Pool with Id ${userPoolId}`,
63+
`User with username ${userWithAttributes.Username} does not exist in User Pool with Id ${userPoolId}`,
6464
false
6565
);
6666
}

0 commit comments

Comments
 (0)