From 5ec6bc1aae0866d17e80fb850ecd7b9a7e2b90e6 Mon Sep 17 00:00:00 2001 From: Dev Date: Mon, 13 May 2024 22:31:53 +0100 Subject: [PATCH] FIxed `getItems()` test due to changes in how items are cloned --- project/tests/helpers/ItemHelper.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/project/tests/helpers/ItemHelper.test.ts b/project/tests/helpers/ItemHelper.test.ts index a732ffe1..1b953cf0 100644 --- a/project/tests/helpers/ItemHelper.test.ts +++ b/project/tests/helpers/ItemHelper.test.ts @@ -280,12 +280,12 @@ describe("ItemHelper", () => it("should call databaseServer.getTables() and jsonUtil.clone() methods", () => { const databaseServerGetTablesSpy = vi.spyOn((itemHelper as any).databaseServer, "getTables"); - const jsonUtilCloneSpy = vi.spyOn((itemHelper as any).jsonUtil, "clone"); + const clonerSpy = vi.spyOn((itemHelper as any).cloner, "clone"); itemHelper.getItems(); expect(databaseServerGetTablesSpy).toHaveBeenCalled(); - expect(jsonUtilCloneSpy).toHaveBeenCalled(); + expect(clonerSpy).toHaveBeenCalled(); }); it("should return a new array, not a reference to the original", () =>