Skip to content

Commit 581be77

Browse files
committed
[chore] added test for default parentSelector.
1 parent e56c414 commit 581be77

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

specs/Modal.spec.js

+5
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ describe('State', () => {
8282
ReactDOM.unmountComponentAtNode(node);
8383
});
8484

85+
it ('default parentSelector should be document.body.', () => {
86+
const modal = renderModal({ isOpen: true });
87+
expect(modal.props.parentSelector()).toEqual(document.body);
88+
});
89+
8590
it('renders the modal content with a dialog aria role when provided ', () => {
8691
const child = 'I am a child of Modal, and he has sent me here...';
8792
const modal = renderModal({ isOpen: true, role: 'dialog' }, child);

0 commit comments

Comments
 (0)