kafka-ui/kafka-ui-react-app/src/components/Schemas/Details/__test__/SchemaVersion.spec.tsx
2021-02-24 15:05:05 +03:00

17 lines
520 B
TypeScript

import React from 'react';
import { shallow } from 'enzyme';
import SchemaVersion from '../SchemaVersion';
import { versions } from './fixtures';
describe('SchemaVersion', () => {
it('renders versions', () => {
const wrapper = shallow(<SchemaVersion version={versions[0]} />);
expect(wrapper.find('td').length).toEqual(3);
expect(wrapper.exists('JSONViewer')).toBeTruthy();
});
it('matches snapshot', () => {
expect(shallow(<SchemaVersion version={versions[0]} />)).toMatchSnapshot();
});
});