From b22ba84b1deb6fd6f4307d7fc8a59653e780f953 Mon Sep 17 00:00:00 2001 From: petehunt Date: Tue, 18 Feb 2014 22:57:41 -0800 Subject: [PATCH] fix docs --- docs/09.4-test-utils.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/09.4-test-utils.md b/docs/09.4-test-utils.md index e1337950..b685787e 100644 --- a/docs/09.4-test-utils.md +++ b/docs/09.4-test-utils.md @@ -7,11 +7,11 @@ prev: class-name-manipulation.html next: examples.html --- -`React.addons.TestUtils` makes it easy to test React components in the testing framework of your choice (we use [Jasmine](http://pivotal.github.io/jasmine/)). All functions except for `renderIntoDocument()` work without a browser DOM. +`React.addons.TestUtils` makes it easy to test React components in the testing framework of your choice (we use [Jasmine](http://pivotal.github.io/jasmine/) with [jsdom](https://github.com/tmpvar/jsdom)). #### ReactComponent renderIntoDocument(ReactComponent instance) -Render a component into a detached DOM node in the document. **This is the only function that requires a DOM.** +Render a component into a detached DOM node in the document. **This function requires a DOM.** #### boolean isComponentOfType(ReactComponent instance, function componentClass) @@ -67,9 +67,11 @@ Pass a mocked component module to this method to augment it with useful methods #### Simulate.{eventName}({ReactComponent|DOMElement} element, object nativeEventData) -Simulate an event dispatch on a React component instance or browser DOM node with optional `nativeEventData` event data. This uses React's event system so it works outside of the browser. **This is possibly the single most useful utility in `ReactTestUtils`.** +Simulate an event dispatch on a React component instance or browser DOM node with optional `nativeEventData` event data. **This is possibly the single most useful utility in `ReactTestUtils`.** -**NOTE:** this helper is used to simulate browser events, so synthetic React events like `change` are not available. If you want to test `change`, simulate the underlying `input` browser event. +> Note: +> +> This helper is used to simulate browser events, so synthetic React events like `change` are not available. If you want to test `change`, simulate the underlying `input` browser event. Example usage: `React.addons.TestUtils.Simulate.click(myComponent)`