import React from 'react';
import PropTypes from 'prop-types';
import 'jest-styled-components';
import { render } from '@testing-library/react';
import { Grommet, Box, Diagram, Stack } from '../..';
const Context = ({ children }: { children: React.ReactNode }) => (
{children}
);
Context.propTypes = {
children: PropTypes.node.isRequired,
};
describe('Diagram', () => {
test('basic', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('type', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('color', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('offset', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('thickness', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
test('anchor', () => {
const { container } = render(
,
);
expect(container.firstChild).toMatchSnapshot();
});
});