fixed a bug + made a testcase out of it
This commit is contained in:
parent
2c60a9b638
commit
9c70f3e4df
2 changed files with 37 additions and 3 deletions
|
@ -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('<br>')
|
||||
const expected = [
|
||||
'Bruh',
|
||||
'Bruh',
|
||||
[
|
||||
stubMention('foo'),
|
||||
stubMention('bar'),
|
||||
stubMention('baz')
|
||||
].join(''),
|
||||
'Bruh'
|
||||
].join('<br>')
|
||||
|
||||
const wrapper = shallowMount(RichContent, {
|
||||
localVue,
|
||||
propsData: {
|
||||
handleLinks: true,
|
||||
greentext: true,
|
||||
emoji: [],
|
||||
html
|
||||
}
|
||||
})
|
||||
|
||||
expect(wrapper.html()).to.eql(compwrap(expected))
|
||||
})
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue