Skip to content

Commit cc572ca

Browse files
committed
[SDK] Improve general test cases
1 parent 3a141e7 commit cc572ca

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

packages/thirdweb/src/extensions/unstoppable-domains/read/resolveName.test.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { describe, expect, it } from "vitest";
22
import { TEST_CLIENT } from "~test/test-clients.js";
3+
import { TEST_ACCOUNT_D } from "~test/test-wallets.js";
34
import { resolveName } from "./resolveName.js";
45

56
// Double check: https://unstoppabledomains.com/d/thirdwebsdk.unstoppable
@@ -13,4 +14,12 @@ describe("Unstoppable Domain: resolve name", () => {
1314
}),
1415
).toBe("thirdwebsdk.unstoppable");
1516
});
17+
18+
it("should throw error on addresses that dont own any UD", async () => {
19+
await expect(() =>
20+
resolveName({ client: TEST_CLIENT, address: TEST_ACCOUNT_D.address }),
21+
).rejects.toThrowError(
22+
`Failed to retrieve domain for address: ${TEST_ACCOUNT_D.address}. Make sure you have set the Reverse Resolution address for your domain at https://unstoppabledomains.com/manage?page=reverseResolution&domain=your-domain`,
23+
);
24+
});
1625
});

0 commit comments

Comments
 (0)