Skip to content

Commit db81256

Browse files
committed
fix: unstoppable domains test
1 parent 9584885 commit db81256

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

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

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,29 @@ import { resolveAddress } from "./resolveAddress.js";
44

55
// Double check: https://unstoppabledomains.com/d/thirdwebsdk.unstoppable
66

7-
describe("Unstoppable Domain: resolve address", () => {
8-
it("should resolve address", async () => {
9-
expect(
10-
(
11-
await resolveAddress({
12-
name: "thirdwebsdk.unstoppable",
13-
client: TEST_CLIENT,
14-
})
15-
).toLowerCase(),
16-
).toBe("0x12345674b599ce99958242b3D3741e7b01841DF3".toLowerCase());
17-
});
7+
describe.runIf(process.env.TW_SECRET_KEY)(
8+
"Unstoppable Domain: resolve address",
9+
() => {
10+
it("should resolve address", async () => {
11+
expect(
12+
(
13+
await resolveAddress({
14+
name: "thirdwebsdk.unstoppable",
15+
client: TEST_CLIENT,
16+
})
17+
).toLowerCase(),
18+
).toBe("0x12345674b599ce99958242b3D3741e7b01841DF3".toLowerCase());
19+
});
1820

19-
it("should throw an error with a non-existent domain name", async () => {
20-
await expect(() =>
21-
resolveAddress({
22-
name: "thirdwebsdk.thissuredoesnotexist",
23-
client: TEST_CLIENT,
24-
}),
25-
).rejects.toThrowError(
26-
"Could not resolve a valid tokenId from the domain: thirdwebsdk.thissuredoesnotexist. Make sure it exists.",
27-
);
28-
});
29-
});
21+
it("should throw an error with a non-existent domain name", async () => {
22+
await expect(() =>
23+
resolveAddress({
24+
name: "thirdwebsdk.thissuredoesnotexist",
25+
client: TEST_CLIENT,
26+
}),
27+
).rejects.toThrowError(
28+
"Could not resolve a valid tokenId from the domain: thirdwebsdk.thissuredoesnotexist. Make sure it exists.",
29+
);
30+
});
31+
},
32+
);

0 commit comments

Comments
 (0)