From 9c70f3e4df2e28863b51156fdbd25e253a3a1b98 Mon Sep 17 00:00:00 2001 From: Henry Jameson Date: Sat, 12 Jun 2021 21:49:40 +0300 Subject: fixed a bug + made a testcase out of it --- test/unit/specs/components/rich_content.spec.js | 35 +++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'test') diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index 20322019..ff491a3a 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -381,4 +381,39 @@ describe('RichContent', () => { expect(wrapper.html()).to.eql(compwrap(expected)) }) + + it('One buggy example', () => { + const html = [ + 'Bruh', + 'Bruh', + [ + makeMention('foo'), + makeMention('bar'), + makeMention('baz') + ].join(''), + 'Bruh' + ].join('
') + const expected = [ + 'Bruh', + 'Bruh', + [ + stubMention('foo'), + stubMention('bar'), + stubMention('baz') + ].join(''), + 'Bruh' + ].join('
') + + const wrapper = shallowMount(RichContent, { + localVue, + propsData: { + handleLinks: true, + greentext: true, + emoji: [], + html + } + }) + + expect(wrapper.html()).to.eql(compwrap(expected)) + }) }) -- cgit v1.2.3-70-g09d2