redux-devtools/packages/redux-devtools-ui/test/Toolbar.test.tsx

23 lines
596 B
TypeScript
Raw Permalink Normal View History

2019-01-03 16:00:55 +03:00
import React from 'react';
import { render } from '@testing-library/react';
2019-01-03 16:00:55 +03:00
import { Toolbar, Divider, Spacer, Button } from '../src';
describe('Toolbar', function () {
2019-01-03 16:00:55 +03:00
it('renders correctly', () => {
const { container } = render(
2019-01-03 16:00:55 +03:00
<Toolbar>
<Button>1</Button>
<Divider />
<Spacer />
<Button>2</Button>
</Toolbar>,
2019-01-03 16:00:55 +03:00
);
expect(container.firstChild).toMatchSnapshot();
2019-01-03 16:00:55 +03:00
});
it('renders with props', () => {
const { container } = render(<Toolbar borderPosition="top" />);
expect(container.firstChild).toMatchSnapshot();
2019-01-03 16:00:55 +03:00
});
});