chore(utils): introduce new test for PEPE2.0 token

This commit is contained in:
tomasklim
2024-08-02 13:50:44 +02:00
committed by Tomáš Klíma
parent c833fab6fa
commit 91d819cc9b

View File

@@ -29,6 +29,14 @@ describe('extractUrlsFromText', () => {
expect(urls).toEqual([]);
});
it('should not match invalid URLs with version in token name', () => {
const text = 'PEPE2.0';
const { textParts, urls } = extractUrlsFromText(text);
expect(textParts).toEqual([text]);
expect(urls).toEqual([]);
});
it('should handle text with multiple URLs related to Ethereum tokens correctly', () => {
const text =
'Visit https://etherscan.io, http://mycrypto.com, and www.ethereum.org to claim your tokens.';