Skip to content

Commit d489e65

Browse files
committed
use void function to invoke wrapped function with the mock
1 parent 3acee7c commit d489e65

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lambdas/authorizer/src/__tests__/index.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ jest.mock("aws-embedded-metrics", () => {
1818

1919
return {
2020
metricScope: jest.fn(
21-
(handler: (metrics: typeof metricsMock) => unknown) => {
21+
(handler: (metrics: typeof metricsMock) => unknown): void => {
2222
const wrapped = handler(metricsMock);
2323
if (typeof wrapped === "function") {
24-
return wrapped();
24+
wrapped();
2525
}
26-
return undefined;
2726
},
2827
),
2928
__metricsMock: metricsMock,

0 commit comments

Comments
 (0)