FIxed getItems() test due to changes in how items are cloned

This commit is contained in:
Dev 2024-05-13 22:31:53 +01:00
parent 14e8f8fa19
commit 5ec6bc1aae

View File

@ -280,12 +280,12 @@ describe("ItemHelper", () =>
it("should call databaseServer.getTables() and jsonUtil.clone() methods", () => it("should call databaseServer.getTables() and jsonUtil.clone() methods", () =>
{ {
const databaseServerGetTablesSpy = vi.spyOn((itemHelper as any).databaseServer, "getTables"); 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(); itemHelper.getItems();
expect(databaseServerGetTablesSpy).toHaveBeenCalled(); expect(databaseServerGetTablesSpy).toHaveBeenCalled();
expect(jsonUtilCloneSpy).toHaveBeenCalled(); expect(clonerSpy).toHaveBeenCalled();
}); });
it("should return a new array, not a reference to the original", () => it("should return a new array, not a reference to the original", () =>