import * as React from 'react';
import { renderHook } from '@testing-library/react-hooks';
import { Navigation } from '../Navigation';
import { List } from '../../List';
import { Link } from '../../Link';
import render from '../../utils/_tests/render';
describe('props', () => {
it('should render correctly', () => {
const { container } = render(
Google
GitHub
);
expect(container.firstChild).toMatchSnapshot();
});
it('should render correctly with CSS props', () => {
const { container } = render(
Google
GitHub
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('composition', () => {
describe('use', () => {
it('should render correctly', () => {
const { container } = render(
Google
GitHub
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('hook', () => {
it('should return with Navigation props', () => {
const { result } = renderHook(() => Navigation.useProps());
expect(result.current).toMatchSnapshot();
});
});
describe('render props', () => {
it('should render correctly', () => {
const { container } = render(
{(NavigationProps) => (
Google
GitHub
)}
);
expect(container.firstChild).toMatchSnapshot();
});
});
});
describe('overrides', () => {
it('Navigation.base should render correctly', () => {
const { container } = render(
Google
GitHub
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('theming', () => {
it('Navigation.base should render correctly', () => {
const { container } = render(
Google
GitHub
,
{
theme: { Navigation: { styles: { base: { backgroundColor: 'red' } } } },
}
);
expect(container.firstChild).toMatchSnapshot();
});
});
describe('defaultProps', () => {
it('should render correctly for className', () => {
const { container } = render(
Google
GitHub
,
{
theme: { Navigation: { defaultProps: { className: 'test' } } },
}
);
expect(container.firstChild).toMatchSnapshot();
});
});