-
Notifications
You must be signed in to change notification settings - Fork 664
Closed
Labels
Description
The test source code:
import VueRouter from 'vue-router'
import { createLocalVue, shallow } from 'vue-test-utils'
import Breadcrumb from './breadcrumb.vue'
import Foo from './foo.vue'
const localVue = createLocalVue()
localVue.use(VueRouter)
const routes = [{ path: '/foo', component: Foo }]
const $route = { path: '/foo' }
const router = new VueRouter({
mode: 'history',
routes
})
const wrapper = shallow(Breadcrumb, {
localVue,
router,
mocks: {
$route
}
})
FernandoBasso