From d3ddd490c233986f1e858b5d079d7c218d3d76ba Mon Sep 17 00:00:00 2001 From: fiatjaf Date: Sat, 22 Nov 2025 22:23:03 -0300 Subject: [PATCH] nip27: test emoji behavior when no tags. --- nip27.test.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nip27.test.ts b/nip27.test.ts index 0555d77..7b8d1bc 100644 --- a/nip27.test.ts +++ b/nip27.test.ts @@ -107,3 +107,9 @@ test('parse content with hashtags and emoji shortcodes', () => { { 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:' }]) +})