import { shallow } from '@edx/react-unit-test-utils'; import { Alert } from '@openedx/paragon'; import Banner from './Banner'; describe('Banner', () => { const props = { children: 'Hello, world!', }; describe('snapshot', () => { test('renders default banner', () => { const wrapper = shallow(); expect(wrapper.snapshot).toMatchSnapshot(); }); test('renders with variants', () => { const wrapper = shallow(); expect(wrapper.snapshot).toMatchSnapshot(); expect(wrapper.instance.findByType(Alert)[0].props.variant).toEqual('success'); }); test('renders with custom class', () => { const wrapper = shallow(); expect(wrapper.snapshot).toMatchSnapshot(); }); }); });