crane-cloud/frontend

View on GitHub
src/components/Modal/Modal.test.js

Summary

Maintainability
A
0 mins
Test Coverage
import React from 'react';

import { shallow } from 'enzyme';

import Modal from '.';
import { bool } from 'prop-types';

describe('Test the Model component', () => { 
    const onClickAway = jest.fn();
    const showModal = false;
    const children = <div>Model</div>
    it('checking for proper rendering', () => {
        const ModalComponent = shallow(<Modal onClickAway={onClickAway} 
            children={children}
            showModal={showModal}/>);
        expect(ModalComponent).toMatchSnapshot();
    })
})