UNPKG

1.05 kBTypeScriptView Raw
1import * as React from 'react';
2import render from '../../_utils/tests/render';
3import Pane from '../Pane';
4
5it('renders correctly for a basic pane', () => {
6 const { container } = render(<Pane>test</Pane>);
7 expect(container.firstChild).toMatchSnapshot();
8});
9
10it('renders correctly for a pane with a border', () => {
11 const { container } = render(<Pane border>test</Pane>);
12 expect(container.firstChild).toMatchSnapshot();
13});
14
15it('renders correctly for a pane with a shadow', () => {
16 const { container } = render(<Pane border="shadow">test</Pane>);
17 expect(container.firstChild).toMatchSnapshot();
18});
19
20it('renders correctly for a full width pane', () => {
21 const { container } = render(<Pane isFullWidth>test</Pane>);
22 expect(container.firstChild).toMatchSnapshot();
23});
24
25['100', '200', '300', '400'].forEach(elevation => {
26 it(`renders correctly for a pane with elevation ${elevation}`, () => {
27 const { container } = render(<Pane elevation={elevation}>test</Pane>);
28 expect(container.firstChild).toMatchSnapshot();
29 });
30});