UNPKG

@momentum-ui/react

Version:

Cisco Momentum UI framework for ReactJs applications

28 lines (21 loc) 705 B
import React from 'react'; import { shallow } from 'enzyme'; import { ModalFooter } from '@momentum-ui/react'; describe('tests for <ModalFooter />', () => { it('should match SnapShot', () => { const container = shallow(<ModalFooter id="test" />); expect(container).toMatchSnapshot(); }); it('should render one ModalFooter', () => { const container = shallow(<ModalFooter />); expect(container.find('.md-modal__footer').length).toEqual(1); }); it('should render children', () => { const container = shallow( <ModalFooter> <div className="testingforMF" /> </ModalFooter> ); expect(container.find('.testingforMF').length).toEqual(1); }); });