aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorHenry Jameson <me@hjkos.com>2022-06-21 01:40:09 +0300
committerHenry Jameson <me@hjkos.com>2022-06-21 01:40:09 +0300
commit7d719a2b188ebee78d115e9102e2ad8f3460a2f0 (patch)
tree283941e9e3d42dc372bec0c36cc9ddf784c4c1fb /test
parentb7b6432e147d0a7f312f5827bee3db39952a9ac4 (diff)
fix tests by just ignoring the html comments
Diffstat (limited to 'test')
-rw-r--r--test/unit/specs/components/rich_content.spec.js15
1 files changed, 2 insertions, 13 deletions
diff --git a/test/unit/specs/components/rich_content.spec.js b/test/unit/specs/components/rich_content.spec.js
index cd8d4b86..8a18a08b 100644
--- a/test/unit/specs/components/rich_content.spec.js
+++ b/test/unit/specs/components/rich_content.spec.js
@@ -356,7 +356,6 @@ describe('RichContent', () => {
p(
'<span class="MentionsLine">',
'<span class="MentionLink mention-link">',
- '<!-- eslint-disable vue/no-v-html -->',
'<a href="lol" class="original" target="_blank">',
'<span>',
'https://</span>',
@@ -365,10 +364,7 @@ describe('RichContent', () => {
'<span>',
'</span>',
'</a>',
- '<!-- eslint-enable vue/no-v-html -->',
- '<!---->', // vue placeholder
'</span>',
- '<!--v-if-->', // vue placeholder, mentionsline's extra mentions and stuff
'</span>'
),
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', () => {
@@ -419,7 +415,6 @@ describe('RichContent', () => {
'<span class="poast-style">',
'<span class="MentionsLine">',
'<span class="MentionLink mention-link">',
- '<!-- eslint-disable vue/no-v-html -->',
'<a href="lol" class="original" target="_blank">',
'<span>',
'https://</span>',
@@ -428,11 +423,8 @@ describe('RichContent', () => {
'<span>',
'</span>',
'</a>',
- '<!-- eslint-enable vue/no-v-html -->',
- '<!---->', // vue placeholder, mentionlink's "new" (i.e. rich) display
'</span>',
'<span class="MentionLink mention-link">',
- '<!-- eslint-disable vue/no-v-html -->',
'<a href="lol" class="original" target="_blank">',
'<span>',
'https://</span>',
@@ -441,10 +433,7 @@ describe('RichContent', () => {
'<span>',
'</span>',
'</a>',
- '<!-- eslint-enable vue/no-v-html -->',
- '<!---->', // vue placeholder, mentionlink's "new" (i.e. rich) display
'</span>',
- '<!--v-if-->', // vue placeholder, mentionsline's extra mentions and stuff
'</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', () => {