diff --git a/lib/utils/ens-cache.test.js b/lib/utils/ens-cache.test.js --- a/lib/utils/ens-cache.test.js +++ b/lib/utils/ens-cache.test.js @@ -43,6 +43,10 @@ const ashoatAddr = '0x911413ef4127910d79303483f7470d095f399ca9'; const ashoatAvatar = 'https://ashoat.com/small_searching.png'; +const commalphaEthAddr = '0x727ad7F5134C03e88087a8019b80388b22aaD24d'; +const commalphaEthAvatar = + 'https://gateway.ipfs.io/ipfs/Qmb6CCsr5Hvv1DKr9Yt9ucbaK8Fz9MUP1kW9NTqAJhk7o8'; + describe('getNameForAddress', () => { it('should fail to return ashoat.eth if not in cache', async () => { if (!process.env.ALCHEMY_API_KEY) { @@ -231,4 +235,13 @@ timesGetAvatarCalledForSingleFetch, ); }); + it("should return commalpha.eth's avatar, an IPFS URI pointing to a JPEG", async () => { + if (!process.env.ALCHEMY_API_KEY) { + return; + } + const commalphaAvatarResult = await ensCache.getAvatarURIForAddress( + commalphaEthAddr, + ); + expect(commalphaAvatarResult).toBe(commalphaEthAvatar); + }); });