1 import urlify from '../../lib/calendar/urlify';
3 describe('urlify', () => {
5 const string = `asd https://dog.com
6 ftps://dog.das/asdasd21.31233#asdad?dog=awd
8 mailto:asd@dd.fas> } ta
11 <a class="boop" href="dog.com">something else </a>
15 A <a href="line.com">line </a> with one https://link1.com and <a href="https://blob.com">another </a> https://link2.com
16 <https://asdasd.adfadf.adfasf>
17 <akdfjadf@aefasdf.adf.mailto:asd@adfasdf.dfadf>`;
18 const result = `asd <a href="https://dog.com">https://dog.com</a>
19 <a href="ftps://dog.das/asdasd21.31233#asdad?dog=awd">ftps://dog.das/asdasd21.31233#asdad?dog=awd</a>
20 <a href="file://dog">file://dog</a>
21 <a href="mailto:asd@dd.fas">mailto:asd@dd.fas</a>> } ta
24 <a class="boop" href="dog.com">something else </a>
25 <a href="sms:+4444444">sms:+4444444</a>
26 <a href="tel:+4444444">tel:+4444444</a>
28 A <a href="line.com">line </a> with one <a href="https://link1.com">https://link1.com</a> and <a href="https://blob.com">another </a> <a href="https://link2.com">https://link2.com</a>
29 <<a href="https://asdasd.adfadf.adfasf">https://asdasd.adfadf.adfasf</a>>
30 <akdfjadf@aefasdf.adf.<a href="mailto:asd@adfasdf.dfadf">mailto:asd@adfasdf.dfadf</a>>`;
31 expect(urlify(string)).toEqual(result);