Browse Source

Added a note about needing document globally available

Added a note in ``10.4-test-utils.md` about needing window, document and
document.createElement globally available before importing React.
main
Edvin Erikson 9 years ago
parent
commit
8148667c6d
  1. 5
      docs/10.4-test-utils.md

5
docs/10.4-test-utils.md

@ -49,6 +49,11 @@ ReactComponent renderIntoDocument(
Render a component into a detached DOM node in the document. **This function requires a DOM.**
> Note:
>
> You will need to have `window`, `window.document` and `window.document.createElement`
globally available **before** you import React. Otherwise React will think it can't access the DOM and methods like `setState` won't work.
### mockComponent
```javascript

Loading…
Cancel
Save