We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17f0d62 commit 335d30aCopy full SHA for 335d30a
src/tests/components/RichTextReader.spec.js
@@ -0,0 +1,14 @@
1
+import { mount } from '@vue/test-utils'
2
+import { test, expect } from 'vitest'
3
+import RichTextReader from '../../components/RichTextReader.vue'
4
+import { nextTick } from 'vue'
5
+
6
+const content = '# Hello world\n\n[this is a link](https://nextcloud.com)'
7
+test('renders markdown', async () => {
8
+ const wrapper = mount(RichTextReader, {
9
+ propsData: { content },
10
+ })
11
+ await nextTick()
12
+ expect(wrapper.get('h1').text()).toBe('#Hello world') // # is the heading anchor
13
+ expect(wrapper.get('a[href="https://nextcloud.com"]').text()).toBe('this is a link')
14
+})
0 commit comments