Skip to content

Commit

Permalink
Add test that checks if portal is null
Browse files Browse the repository at this point in the history
  • Loading branch information
Ives van Hoorne committed Jun 20, 2017
1 parent dc14e2d commit 9f3fd85
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 @@ -30,6 +30,11 @@ describe('State', () => {
expect(ReactDOM.findDOMNode(mcontent(modal))).toNotExist();
});

it('doesn\'t render the portal if modal is closed', () => {
const modal = renderModal({}, 'hello');
expect(ReactDOM.findDOMNode(modal.portal)).toNotExist();
})

it('has default props', () => {
const node = document.createElement('div');
Modal.setAppElement(document.createElement('div'));
Expand Down

0 comments on commit 9f3fd85

Please sign in to comment.