diff --git a/packages/metrics/tests/unit/middleware/middy.test.ts b/packages/metrics/tests/unit/middleware/middy.test.ts index 41a57937ef..f39d9f8db8 100644 --- a/packages/metrics/tests/unit/middleware/middy.test.ts +++ b/packages/metrics/tests/unit/middleware/middy.test.ts @@ -169,7 +169,7 @@ describe('Middy middleware', () => { serviceName: 'orders', }); const consoleSpy = jest.spyOn(metrics['console'], 'log'); - const handler = middy(() => { + const handler = middy(async (): Promise => { metrics.addMetric('successfulBooking', MetricUnit.Count, 2); metrics.addMetric('successfulBooking', MetricUnit.Count, 1); }).use(logMetrics(metrics));