From 581be775a6db98257a8dd5db4367294480c0bf1d Mon Sep 17 00:00:00 2001 From: Bruno Dias Date: Thu, 29 Jun 2017 20:49:12 -0300 Subject: [PATCH] [chore] added test for default parentSelector. --- specs/Modal.spec.js | 5 +++++ 1 file changed, 5 insertions(+) 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);