fix not escaping some stuff

This commit is contained in:
Henry Jameson 2021-06-18 21:42:46 +03:00
parent 8fe4355a6b
commit c6831a3810
2 changed files with 28 additions and 8 deletions

View file

@ -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'),