diff --git a/packages/thirdweb/src/extensions/unstoppable-domains/read/resolveAddress.test.ts b/packages/thirdweb/src/extensions/unstoppable-domains/read/resolveAddress.test.ts index f85962fd906..4aa9eb7166b 100644 --- a/packages/thirdweb/src/extensions/unstoppable-domains/read/resolveAddress.test.ts +++ b/packages/thirdweb/src/extensions/unstoppable-domains/read/resolveAddress.test.ts @@ -4,26 +4,29 @@ import { resolveAddress } from "./resolveAddress.js"; // Double check: https://unstoppabledomains.com/d/thirdwebsdk.unstoppable -describe("Unstoppable Domain: resolve address", () => { - it("should resolve address", async () => { - expect( - ( - await resolveAddress({ - name: "thirdwebsdk.unstoppable", - client: TEST_CLIENT, - }) - ).toLowerCase(), - ).toBe("0x12345674b599ce99958242b3D3741e7b01841DF3".toLowerCase()); - }); +describe.runIf(process.env.TW_SECRET_KEY)( + "Unstoppable Domain: resolve address", + () => { + it("should resolve address", async () => { + expect( + ( + await resolveAddress({ + name: "thirdwebsdk.unstoppable", + client: TEST_CLIENT, + }) + ).toLowerCase(), + ).toBe("0x12345674b599ce99958242b3D3741e7b01841DF3".toLowerCase()); + }); - it("should throw an error with a non-existent domain name", async () => { - await expect(() => - resolveAddress({ - name: "thirdwebsdk.thissuredoesnotexist", - client: TEST_CLIENT, - }), - ).rejects.toThrowError( - "Could not resolve a valid tokenId from the domain: thirdwebsdk.thissuredoesnotexist. Make sure it exists.", - ); - }); -}); + it("should throw an error with a non-existent domain name", async () => { + await expect(() => + resolveAddress({ + name: "thirdwebsdk.thissuredoesnotexist", + client: TEST_CLIENT, + }), + ).rejects.toThrowError( + "Could not resolve a valid tokenId from the domain: thirdwebsdk.thissuredoesnotexist. Make sure it exists.", + ); + }); + }, +);