diff options
| author | Henry Jameson <me@hjkos.com> | 2021-06-18 21:42:46 +0300 |
|---|---|---|
| committer | Henry Jameson <me@hjkos.com> | 2021-06-18 21:42:46 +0300 |
| commit | c6831a381033fa160fba95fa88b1179d3c670d9d (patch) | |
| tree | 48036c6671b186434ae4ce83e46b279b522802c0 /test/unit | |
| parent | 8fe4355a6b84ae81b54228e6749a4ab82966ff2e (diff) | |
fix not escaping some stuff
Diffstat (limited to 'test/unit')
| -rw-r--r-- | test/unit/specs/components/rich_content.spec.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js index 96c480ea..fbf8973d 100644 --- a/test/unit/specs/components/rich_content.spec.js +++ b/test/unit/specs/components/rich_content.spec.js @@ -27,6 +27,29 @@ describe('RichContent', () => { expect(wrapper.html()).to.eql(compwrap(html)) }) + it('unescapes everything as needed', () => { + const html = [ + p('Testing 'em all'), + 'Testing 'em all' + ].join('') + const expected = [ + p('Testing \'em all'), + 'Testing \'em all' + ].join('') + const wrapper = shallowMount(RichContent, { + localVue, + propsData: { + hideMentions: true, + handleLinks: true, + greentext: true, + emoji: [], + html + } + }) + + expect(wrapper.html()).to.eql(compwrap(expected)) + }) + it('removes mentions from the beginning of post', () => { const html = p( makeMention('John'), |
