mirror of
https://github.com/wahyd4/vuepress.git
synced 2026-08-22 11:45:56 +10:00
- fix($core): markdown slot doesn‘t work. (regression of c85f62d)
- docs: fresh Node.JS API.
- test: official plugins.
30 lines
704 B
JavaScript
30 lines
704 B
JavaScript
import { mount, RouterLinkStub } from '@vue/test-utils'
|
|
import DropdownLink from '../../components/DropdownLink.vue'
|
|
import { createLocalVue } from '@vuepress/test-utils/client'
|
|
|
|
describe('DropdownLink', () => {
|
|
test('renders dropdown link.', () => {
|
|
const item = {
|
|
text: 'VuePress',
|
|
items: [
|
|
{
|
|
text: 'Guide',
|
|
link: '/guide/'
|
|
},
|
|
{
|
|
text: 'Config Reference',
|
|
link: '/config/'
|
|
}
|
|
]
|
|
}
|
|
const wrapper = mount(DropdownLink, {
|
|
localVue: createLocalVue(),
|
|
stubs: {
|
|
'router-link': RouterLinkStub
|
|
},
|
|
propsData: { item }
|
|
})
|
|
expect(wrapper.html()).toMatchSnapshot()
|
|
})
|
|
})
|