SchemaVersion.spec.tsx 545 B

123456789101112131415161718
  1. import React from 'react';
  2. import { shallow } from 'enzyme';
  3. import SchemaVersion from 'components/Schemas/Details/SchemaVersion';
  4. import { versions } from './fixtures';
  5. describe('SchemaVersion', () => {
  6. it('renders versions', () => {
  7. const wrapper = shallow(<SchemaVersion version={versions[0]} />);
  8. expect(wrapper.find('td').length).toEqual(3);
  9. expect(wrapper.exists('JSONEditor')).toBeTruthy();
  10. });
  11. it('matches snapshot', () => {
  12. expect(shallow(<SchemaVersion version={versions[0]} />)).toMatchSnapshot();
  13. });
  14. });