You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it("fetchNftDescription should work with ERC721",async()=>{
7
+
constdesc=awaitfetchNftDescription({
8
+
contract: DOODLES_CONTRACT,
9
+
tokenId: 0n,
10
+
});
11
+
expect(desc).toBe(
12
+
"A community-driven collectibles project featuring art by Burnt Toast. Doodles come in a joyful range of colors, traits and sizes with a collection size of 10,000. Each Doodle allows its owner to vote for experiences and activations paid for by the Doodles Community Treasury. Burnt Toast is the working alias for Scott Martin, a Canadian–based illustrator, designer, animator and muralist.",
13
+
);
14
+
});
15
+
16
+
it("fetchNftDescription should work with ERC1155",async()=>{
17
+
constdesc=awaitfetchNftDescription({
18
+
contract: DROP1155_CONTRACT,
19
+
tokenId: 0n,
20
+
});
21
+
expect(desc).toBe("");
22
+
});
23
+
24
+
it("fetchNftDescription should respect descriptionResolver as a string",async()=>{
25
+
constdesc=awaitfetchNftDescription({
26
+
contract: DOODLES_CONTRACT,
27
+
tokenId: 0n,
28
+
descriptionResolver: "string",
29
+
});
30
+
expect(desc).toBe("string");
31
+
});
32
+
33
+
it("fetchNftDescription should respect descriptionResolver as a non-async function",async()=>{
34
+
constdesc=awaitfetchNftDescription({
35
+
contract: DOODLES_CONTRACT,
36
+
tokenId: 0n,
37
+
descriptionResolver: ()=>"non-async",
38
+
});
39
+
expect(desc).toBe("non-async");
40
+
});
41
+
42
+
it("fetchNftDescription should respect descriptionResolver as a async function",async()=>{
0 commit comments