Skip to content

Commit 56f77d7

Browse files
temp fix to unit tests for info logging
1 parent 969f8a9 commit 56f77d7

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

lambdas/supplier-allocator/src/handler/__tests__/allocate-handler.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -575,8 +575,7 @@ describe("createSupplierAllocatorHandler", () => {
575575
const result = await handler(evt, {} as any, {} as any);
576576
if (!result) throw new Error("expected BatchResponse, got void");
577577
expect(result.batchItemFailures).toHaveLength(0);
578-
expect((mockedDeps.logger.error as jest.Mock).mock.calls).toHaveLength(1);
579-
expect((mockedDeps.logger.error as jest.Mock).mock.calls[0][0]).toEqual(
578+
expect((mockedDeps.logger.info as jest.Mock).mock.calls[1][0]).toEqual(
580579
expect.objectContaining({
581580
description: "Error fetching supplier from config",
582581
err: configError,
@@ -655,8 +654,7 @@ describe("createSupplierAllocatorHandler", () => {
655654
if (!result) throw new Error("expected BatchResponse, got void");
656655

657656
expect(result.batchItemFailures).toHaveLength(0);
658-
expect((mockedDeps.logger.error as jest.Mock).mock.calls).toHaveLength(1);
659-
expect((mockedDeps.logger.error as jest.Mock).mock.calls[0][0]).toEqual(
657+
expect((mockedDeps.logger.info as jest.Mock).mock.calls[1][0]).toEqual(
660658
expect.objectContaining({
661659
description: "Error fetching supplier from config",
662660
variantId: "lv1",

0 commit comments

Comments
 (0)