From bb69a91f103d01ed0c74832151fe560223595371 Mon Sep 17 00:00:00 2001 From: Bruno Dias Date: Sun, 25 Jun 2017 17:32:39 -0300 Subject: [PATCH] [chore] improvements on readme testing section. --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 06933b1c..41046df8 100644 --- a/README.md +++ b/README.md @@ -259,11 +259,13 @@ ReactDOM.render(, appElement); ## Testing When using React Test Utils with this library, here are some things to keep in mind: -- You need to set isOpen={true} on the modal component for it to render its children. + +- You need to set `isOpen={true}` on the modal component for it to render its children. - You need to use the `.portal` property, as in `ReactDOM.findDOMNode(renderedModal.portal)` or `TestUtils.scryRenderedDOMComponentsWithClass(Modal.portal, 'my-modal-class')` to acquire a handle to the inner contents of your modal. By default the modal is closed when clicking outside of it (the overlay area). If you want to prevent this behavior you can pass the 'shouldCloseOnOverlayClick' prop with 'false' value. + ```xml