forked from vuejs/vuepress
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsnippet.spec.js
26 lines (22 loc) · 869 Bytes
/
snippet.spec.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
import { Md, getFragment } from './util'
import snippet from '@/markdown/snippet.js'
import highlightLines from '@/markdown/highlightLines.js'
const md = Md().use(snippet)
const mdH = Md().use(snippet).use(highlightLines)
describe('snippet', () => {
test('import snippet', async () => {
const input = await getFragment('code-snippet')
const output = md.render(input)
expect(output).toMatchSnapshot()
})
test('import snippet with highlight single line', async () => {
const input = await getFragment('code-snippet-highlightLines-single')
const output = mdH.render(input)
expect(output).toMatchSnapshot()
})
test('import snippet with highlight multiple lines', async () => {
const input = await getFragment('code-snippet-highlightLines-multiple')
const output = mdH.render(input)
expect(output).toMatchSnapshot()
})
})