import Breadcrumbs from "~/components/Layout/Breadcrumbs"; import {shallowMount, RouterLinkStub} from "@vue/test-utils" describe("Breadcrumbs", () => { let wrapper beforeEach(() => { const $route = { path: '/organization/address/123' } const $t = () => { } wrapper = shallowMount(Breadcrumbs, { stubs: { NuxtLink: RouterLinkStub }, mocks: { $route, $router:{ match:()=>{ return{ name: 'foo', path: 'bar' } } }, $nuxt: { context: { $config: { baseURL_adminLegacy: '/' }, app: { i18n:{ t:() =>{ } } } }, }, $t } }) }) it("will display 4 li", () => { expect(wrapper.findAll("#breadcrumbs li")).toHaveLength(4); }); });