Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: update signOut unit tests #12561

Merged
merged 4 commits into from
Nov 14, 2023
Merged

Conversation

cshfang
Copy link
Contributor

@cshfang cshfang commented Nov 10, 2023

Description of changes

This PR updates and adds unit tests for the updated signOut API

Description of how you validated changes

yarn test

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@cshfang cshfang requested a review from a team as a code owner November 10, 2023 22:49
@@ -96,26 +99,30 @@ async function clientSignOut(cognitoConfig: CognitoUserPoolConfig) {
}
} catch (err) {
// this shouldn't throw
// TODO(v6): add logger message
logger.debug(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added to address a TODO and facilitate better logic branch testing

}
}

async function globalSignOut(cognitoConfig: CognitoUserPoolConfig) {
try {
const tokens = await tokenOrchestrator.getTokenStore().loadTokens();
assertAuthTokens(tokens);
const authTokens = await tokenOrchestrator.getTokenStore().loadTokens();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just updated variable name here for consistency with clientSignOut function

@cshfang cshfang requested a review from a team as a code owner November 13, 2023 17:16
@cshfang cshfang merged commit 032ab8e into aws-amplify:main Nov 14, 2023
29 checks passed
@cshfang cshfang deleted the test/signout branch November 14, 2023 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants