import * as React from 'react';
import { BreadcrumbItem } from '../BreadcrumbItem';
import { render } from '@testing-library/react';
describe('BreadcrumbItem component', () => {
test('should render default breadcrumbItem', () => {
const { asFragment } = render(Item);
expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with className', () => {
const { asFragment } = render(Item);
expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with id', () => {
const { asFragment } = render(Item);
expect(asFragment()).toMatchSnapshot();
});
test('should render active breadcrumbItem', () => {
const { asFragment } = render(Item);
expect(asFragment()).toMatchSnapshot();
});
test('should render link breadcrumbItem', () => {
const { asFragment } = render(Item);
expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with target', () => {
const { asFragment } = render(Item);
expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with custom element', () => {
const { asFragment } = render(
Header
);
expect(asFragment()).toMatchSnapshot();
});
test('should render breadcrumbItem with component', () => {
const MyComponent = () =>
My component contents
;
const consoleError = jest.spyOn(console, 'error').mockImplementation();
const { asFragment } = render(Stuff);
expect(asFragment()).toMatchSnapshot();
expect(consoleError).not.toHaveBeenCalled();
});
});