nip27: test emoji behavior when no tags.

This commit is contained in:
fiatjaf
2025-11-22 22:23:03 -03:00
parent 7730e321a5
commit d3ddd490c2

View File

@@ -107,3 +107,9 @@ test('parse content with hashtags and emoji shortcodes', () => {
{ type: 'emoji', shortcode: 'star', url: 'https://example.com/star.png' }, { type: 'emoji', shortcode: 'star', url: 'https://example.com/star.png' },
]) ])
}) })
test('emoji shortcodes are treated as text if no event tags', () => {
const blocks = Array.from(parse('hello :alpaca:'))
expect(blocks).toEqual([{ type: 'text', text: 'hello :alpaca:' }])
})