diff --git a/src/modules/inventory/inventory.service.test.ts b/src/modules/inventory/inventory.service.test.ts index a60d8b3..462e9bd 100644 --- a/src/modules/inventory/inventory.service.test.ts +++ b/src/modules/inventory/inventory.service.test.ts @@ -273,10 +273,10 @@ describe("inventoryService", () => { expect(mockLimit).toHaveBeenCalledWith(20); expect(result).toHaveLength(2); - expect(result[0].name).toBe("Common Sword (5) [Common]"); - expect(result[0].value).toBe(1); - expect(result[1].name).toBe("Epic Shield (1) [Epic]"); - expect(result[1].value).toBe(2); + expect(result[0]?.name).toBe("Common Sword (5) [Common]"); + expect(result[0]?.value).toBe(1); + expect(result[1]?.name).toBe("Epic Shield (1) [Epic]"); + expect(result[1]?.value).toBe(2); }); }); });