redux-devtools/packages/devui/tests/Toolbar.test.js

24 lines
615 B
JavaScript
Raw Normal View History

2019-01-03 16:00:55 +03:00
import React from 'react';
import { render } from 'enzyme';
import { renderToJson } from 'enzyme-to-json';
import { Toolbar, Divider, Spacer, Button } from '../src';
2019-01-10 21:51:14 +03:00
describe('Toolbar', function() {
2019-01-03 16:00:55 +03:00
it('renders correctly', () => {
const wrapper = render(
<Toolbar>
<Button>1</Button>
<Divider />
<Spacer />
<Button>2</Button>
</Toolbar>
);
expect(renderToJson(wrapper)).toMatchSnapshot();
});
it('renders with props', () => {
2019-01-10 21:51:14 +03:00
const wrapper = render(<Toolbar borderPosition="top" />);
2019-01-03 16:00:55 +03:00
expect(renderToJson(wrapper)).toMatchSnapshot();
});
});