diff --git a/specs/Modal.spec.js b/specs/Modal.spec.js index 1ad77ba0..272cc45e 100644 --- a/specs/Modal.spec.js +++ b/specs/Modal.spec.js @@ -82,6 +82,11 @@ describe('State', () => { ReactDOM.unmountComponentAtNode(node); }); + it ('default parentSelector should be document.body.', () => { + const modal = renderModal({ isOpen: true }); + expect(modal.props.parentSelector()).toEqual(document.body); + }); + it('renders the modal content with a dialog aria role when provided ', () => { const child = 'I am a child of Modal, and he has sent me here...'; const modal = renderModal({ isOpen: true, role: 'dialog' }, child);