fix tests by just ignoring the html comments
This commit is contained in:
parent
b7b6432e14
commit
7d719a2b18
@ -356,7 +356,6 @@ describe('RichContent', () => {
|
|||||||
p(
|
p(
|
||||||
'<span class="MentionsLine">',
|
'<span class="MentionsLine">',
|
||||||
'<span class="MentionLink mention-link">',
|
'<span class="MentionLink mention-link">',
|
||||||
'<!-- eslint-disable vue/no-v-html -->',
|
|
||||||
'<a href="lol" class="original" target="_blank">',
|
'<a href="lol" class="original" target="_blank">',
|
||||||
'<span>',
|
'<span>',
|
||||||
'https://</span>',
|
'https://</span>',
|
||||||
@ -365,10 +364,7 @@ describe('RichContent', () => {
|
|||||||
'<span>',
|
'<span>',
|
||||||
'</span>',
|
'</span>',
|
||||||
'</a>',
|
'</a>',
|
||||||
'<!-- eslint-enable vue/no-v-html -->',
|
|
||||||
'<!---->', // vue placeholder
|
|
||||||
'</span>',
|
'</span>',
|
||||||
'<!--v-if-->', // vue placeholder, mentionsline's extra mentions and stuff
|
|
||||||
'</span>'
|
'</span>'
|
||||||
),
|
),
|
||||||
p(
|
p(
|
||||||
@ -387,7 +383,7 @@ describe('RichContent', () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected))
|
expect(wrapper.html().replace(/\n/g, '').replace(/<!--.*?-->/g, '')).to.eql(compwrap(expected))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('rich contents of nested mentions are handled properly', () => {
|
it('rich contents of nested mentions are handled properly', () => {
|
||||||
@ -419,7 +415,6 @@ describe('RichContent', () => {
|
|||||||
'<span class="poast-style">',
|
'<span class="poast-style">',
|
||||||
'<span class="MentionsLine">',
|
'<span class="MentionsLine">',
|
||||||
'<span class="MentionLink mention-link">',
|
'<span class="MentionLink mention-link">',
|
||||||
'<!-- eslint-disable vue/no-v-html -->',
|
|
||||||
'<a href="lol" class="original" target="_blank">',
|
'<a href="lol" class="original" target="_blank">',
|
||||||
'<span>',
|
'<span>',
|
||||||
'https://</span>',
|
'https://</span>',
|
||||||
@ -428,11 +423,8 @@ describe('RichContent', () => {
|
|||||||
'<span>',
|
'<span>',
|
||||||
'</span>',
|
'</span>',
|
||||||
'</a>',
|
'</a>',
|
||||||
'<!-- eslint-enable vue/no-v-html -->',
|
|
||||||
'<!---->', // vue placeholder, mentionlink's "new" (i.e. rich) display
|
|
||||||
'</span>',
|
'</span>',
|
||||||
'<span class="MentionLink mention-link">',
|
'<span class="MentionLink mention-link">',
|
||||||
'<!-- eslint-disable vue/no-v-html -->',
|
|
||||||
'<a href="lol" class="original" target="_blank">',
|
'<a href="lol" class="original" target="_blank">',
|
||||||
'<span>',
|
'<span>',
|
||||||
'https://</span>',
|
'https://</span>',
|
||||||
@ -441,10 +433,7 @@ describe('RichContent', () => {
|
|||||||
'<span>',
|
'<span>',
|
||||||
'</span>',
|
'</span>',
|
||||||
'</a>',
|
'</a>',
|
||||||
'<!-- eslint-enable vue/no-v-html -->',
|
|
||||||
'<!---->', // vue placeholder, mentionlink's "new" (i.e. rich) display
|
|
||||||
'</span>',
|
'</span>',
|
||||||
'<!--v-if-->', // vue placeholder, mentionsline's extra mentions and stuff
|
|
||||||
'</span>',
|
'</span>',
|
||||||
' ',
|
' ',
|
||||||
'</span>',
|
'</span>',
|
||||||
@ -462,7 +451,7 @@ describe('RichContent', () => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
expect(wrapper.html().replace(/\n/g, '')).to.eql(compwrap(expected))
|
expect(wrapper.html().replace(/\n/g, '').replace(/<!--.*?-->/g, '')).to.eql(compwrap(expected))
|
||||||
})
|
})
|
||||||
|
|
||||||
it('rich contents of a link are handled properly', () => {
|
it('rich contents of a link are handled properly', () => {
|
||||||
|
Loading…
Reference in New Issue
Block a user