Skip to content

Commit

Permalink
[chore] added test for default parentSelector.
Browse files Browse the repository at this point in the history
  • Loading branch information
diasbruno committed Jul 2, 2017
1 parent e56c414 commit 581be77
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions specs/Modal.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 581be77

Please sign in to comment.