Skip to content

Commit

Permalink
adapt test of SoulName to don't get directly a json from tokenUri()
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelcabot committed Sep 16, 2022
1 parent 85a5ea0 commit 5c2759c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion test/SoulName.test.ts
Expand Up @@ -184,11 +184,13 @@ describe("Soul Name", () => {
it("should get a valid token URI", async () => {
const tokenUri = await soulName.tokenURI(nameId);

console.log(tokenUri);

// check if it's a valid url
expect(() => new URL(tokenUri)).to.not.throw();
// we expect that the token uri is already encoded
expect(tokenUri).to.equal(encodeURI(tokenUri));
expect(tokenUri).to.contain("data:application/json");
expect(tokenUri).to.contain("/name/");
});
});

Expand Down

0 comments on commit 5c2759c

Please sign in to comment.