diff options
| author | Henry Jameson <me@hjkos.com> | 2021-06-12 20:42:17 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2021-06-12 20:43:29 +0300 |
| commit | 418f029789f5e1cc22fd7db4f269088633d90050 (patch) | |
| tree | f209a9ff9a39b583a87e63b02568c6d9b6e9e208 /test/unit/specs/components | |
| parent | 90a188f2c3c16b926c75bf4aa749633e6967e5a0 (diff) | |
review + fixes
Diffstat (limited to 'test/unit/specs/components')
| -rw-r--r-- | test/unit/specs/components/rich_content.spec.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index 05c0b259..f2c3f04e 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -354,4 +354,32 @@ describe('RichContent', () => { expect(wrapper.html()).to.eql(compwrap(html)) }) + + it('Greentext + last mentions', () => { + const html = [ + '>quote', + makeMention('lol'), + '>quote', + '>quote' + ].join('\n') + const expected = [ + '<span class="greentext">>quote</span>', + stubMention('lol'), + '<span class="greentext">>quote</span>', + '<span class="greentext">>quote</span>' + ].join('\n') + + const wrapper = shallowMount(RichContent, { + localVue, + propsData: { + handleLinks: true, + greentext: true, + emoji: [], + html + } + }) + + expect(wrapper.html()).to.eql(compwrap(expected)) + }) + }) |
