mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-01 20:04:09 +03:00
interface: add new test for mention+link msgs
This commit is contained in:
parent
14e7378486
commit
e704d90e06
@ -65,4 +65,12 @@ describe('tokenizeMessage', () => {
|
||||
expect(url).toEqual('https://urbit.org');
|
||||
expect(text3).toEqual(' a link is here!');
|
||||
});
|
||||
it('should tokenize both mentions and links', () => {
|
||||
const example = '~haddef-sigwen have you looked at https://urbit.org lately?';
|
||||
const [{ mention }, { text }, { url }, { text: text2 }] = tokenizeMessage(example);
|
||||
expect(mention).toEqual('~haddef-sigwen');
|
||||
expect(text).toEqual(' have you looked at ');
|
||||
expect(url).toEqual('https://urbit.org');
|
||||
expect(text2).toEqual(' lately?');
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user