Skip to content

Commit

Permalink
test(AWS Cognito): Improve tests setup
Browse files Browse the repository at this point in the history
  • Loading branch information
medikoo committed Oct 6, 2020
1 parent 72d63f7 commit e753399
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/integration/cognitoUserPool.test.js
Expand Up @@ -75,7 +75,13 @@ describe('AWS - Cognito User Pool Integration Test', function() {
await createUser(userPoolId, 'johndoe', '!!!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, '');
expect(logs).to.include(`"userPoolId":"${userPoolId}"`);
Expand Down

0 comments on commit e753399

Please sign in to comment.