diff --git a/packages/app/tests/composables/useContractABI.spec.ts b/packages/app/tests/composables/useContractABI.spec.ts index 56bc4981b8..f4e1040e52 100644 --- a/packages/app/tests/composables/useContractABI.spec.ts +++ b/packages/app/tests/composables/useContractABI.spec.ts @@ -1,4 +1,4 @@ -import { ref } from "vue"; +import { computed, ref } from "vue"; import { describe, expect, it, type SpyInstance, vi } from "vitest"; @@ -66,6 +66,14 @@ describe("useContractABI:", () => { expect(isRequestFailed.value).toEqual(true); mock.mockRestore(); }); + it("doesn't make request when there is no verification api url", async () => { + const mock = ($fetch as unknown as SpyInstance).mockClear(); + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const { getCollection } = useContractABI({ currentNetwork: computed(() => ({})) } as any); + await getCollection(["0x5550000000000000000000000000000000000000"]); + expect(mock).toHaveBeenCalledTimes(0); + mock.mockRestore(); + }); it("caches the results", async () => { const mock = ($fetch as unknown as SpyInstance).mockClear(); const { getCollection } = useContractABI();