Skip to content

Commit 78270c5

Browse files
TPXPgaearon
authored andcommitted
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.
1 parent f4325d0 commit 78270c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/docs/reference-test-renderer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ expect(testInstance.findByProps({className: "sub"}).children).toEqual(['Sub']);
103103
TestRenderer.create(element, options);
104104
```
105105

106-
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.
106+
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).
107107

108108
### `TestRenderer.act()` {#testrendereract}
109109

0 commit comments

Comments
 (0)