redux-devtools/packages/redux-devtools-ui/tests/Toolbar.test.tsx
Nathan Bierema 57ec0534b2
Replace enzyme with React testing library in ui (#917)
* Replace enzyme with React testing library in ui

* Mock Math.random()
2021-10-22 04:18:03 +00:00

23 lines
595 B
TypeScript

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