diff --git a/test/integration/aws/function.test.js b/test/integration/aws/function.test.js index cd1670d8c..0f815a284 100644 --- a/test/integration/aws/function.test.js +++ b/test/integration/aws/function.test.js @@ -38,8 +38,8 @@ describe('test/integration/aws/function.test.js', function () { await removeService(serviceDir); }); - it('on async invoke should invoke destination target', async () => - confirmCloudWatchLogs( + it('on async invoke should invoke destination target', async () => { + const events = await confirmCloudWatchLogs( `/aws/lambda/${stackName}-target`, async () => { await awsRequest('Lambda', 'invoke', { @@ -47,8 +47,8 @@ describe('test/integration/aws/function.test.js', function () { InvocationType: 'Event', }); }, - { checkIsComplete: (events) => events.length } - ).then((events) => { - expect(events.length > 0).to.equal(true); - })); + { checkIsComplete: (soFarEvents) => soFarEvents.length } + ); + expect(events.length > 0).to.equal(true); + }); });