From 4aac0125e591c6f2ef51bad475e79802be51f068 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Tue, 15 Jun 2021 14:43:44 +0300 Subject: fixed bug with hashtags --- test/unit/specs/components/rich_content.spec.js | 36 +++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'test/unit/specs/components/rich_content.spec.js') diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index e364a5b3..82f1ae89 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -603,4 +603,40 @@ describe('RichContent', () => { expect(wrapper.html()).to.eql(compwrap(expected)) }) + + it('buggy example/hashtags', () => { + const html = [ + '

', + '', + 'NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg', + ' ', + '#nou', + ' ', + '#screencap', + '

' + ].join('') + const expected = [ + '

', + '', + 'NHCMDUXJPPZ6M3Z2CQ6D2EBRSWGE7MZY.jpg', + ' ', + '#nou', + ' ', + '#screencap', + '

' + ].join('') + + const wrapper = shallowMount(RichContent, { + localVue, + propsData: { + hideMentions: true, + handleLinks: true, + greentext: true, + emoji: [], + html + } + }) + + expect(wrapper.html()).to.eql(compwrap(expected)) + }) }) -- cgit v1.2.3-70-g09d2