1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00
awx/__tests__/components/ExpandCollapse.test.jsx

24 lines
627 B
JavaScript

import React from 'react';
import { mount } from 'enzyme';
import { I18nProvider } from '@lingui/react';
import ExpandCollapse from '../../src/components/ExpandCollapse';
describe('<ExpandCollapse />', () => {
const onCompact = jest.fn();
const onExpand = jest.fn();
const isCompact = false;
test('initially renders without crashing', () => {
const wrapper = mount(
<I18nProvider>
<ExpandCollapse
onCompact={onCompact}
onExpand={onExpand}
isCompact={isCompact}
/>
</I18nProvider>
);
expect(wrapper.length).toBe(1);
wrapper.unmount();
});
});