| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- 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);
- });
- });
|