Skip to content

Commit

Permalink
test(AWS Cognito): Improve logs handling
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Sep 24, 2020
1 parent 2fdeb51 commit 8409d61
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/integration/cognitoUserPool.test.js
Expand Up @@ -93,7 +93,13 @@ describe('AWS - Cognito User Pool Integration Test', function() {
await createUser(userPoolId, 'janedoe', '!!!wAsD123456wAsD!!!');
const events = await confirmCloudWatchLogs(
`/aws/lambda/${stackName}-${functionName}`,
async () => {}
async () => {},
{
checkIsComplete: soFarEvents => {
const logs = soFarEvents.reduce((data, event) => data + event.message, '');
return logs.includes('userName');
},
}
);
const logs = events.reduce((data, event) => data + event.message, '');

Expand Down

0 comments on commit 8409d61

Please sign in to comment.