Files
ULIVZandGitHub e5d8ed4655 feat: refine node api (#1395)
- fix($core): markdown slot doesn‘t work. (regression of c85f62d)
- docs: fresh Node.JS API.
- test: official plugins.
2019-03-04 23:46:13 +08:00

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()
})
})