Browse Source

Rephrase confusing documentation about TestRenderer.create return (#2246)

The addition of the `TestRenderer.act()` method to the documentation broke the logical flow and "The returned instance has the following methods and properties." is now confusing since it's the `act()` method that is now documented afterwards. This commit aims at clarifying what is returned.
main
Thomas P 5 years ago
committed by Dan Abramov
parent
commit
78270c581d
  1. 2
      content/docs/reference-test-renderer.md

2
content/docs/reference-test-renderer.md

@ -103,7 +103,7 @@ expect(testInstance.findByProps({className: "sub"}).children).toEqual(['Sub']);
TestRenderer.create(element, options);
```
Create a `TestRenderer` instance with the passed React element. It doesn't use the real DOM, but it still fully renders the component tree into memory so you can make assertions about it. The returned instance has the following methods and properties.
Create a `TestRenderer` instance with the passed React element. It doesn't use the real DOM, but it still fully renders the component tree into memory so you can make assertions about it. Returns a [TestRenderer instance](#testrenderer-instance).
### `TestRenderer.act()` {#testrendereract}

Loading…
Cancel
Save