Skip to content

Commit 60070ab

Browse files
toy9910taehwanno
authored andcommitted
translating reference-test-renderer.md (#190)
* Update reference-test-renderer.md * Update reference-test-renderer.md * Update reference-test-renderer.md * Update reference-test-renderer.md * Update reference-test-renderer.md
1 parent 883f3a2 commit 60070ab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/docs/reference-test-renderer.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,27 +113,27 @@ TestRenderer.create(element, options);
113113
TestRenderer.act(callback);
114114
```
115115

116-
Similar to the [`act()` helper from `react-dom/test-utils`](/docs/test-utils.html#act), `TestRenderer.act` prepares a component for assertions. Use this version of `act()` to wrap calls to `TestRenderer.create` and `testRenderer.update`.
116+
[`react-dom/test-utils``act()`](/docs/test-utils.html#act)와 비슷하게, `TestRenderer.act`는 검증을 위한 컴포넌트들을 준비합니다. `TestRenderer.create``trestRenderer.update`의 호출을 이 버전의 `act()`를 사용해서 감싸주세요.
117117

118118
```javascript
119119
import {create, act} from 'react-test-renderer';
120120
import App from './app.js'; // The component being tested
121121

122-
// render the component
122+
// 컴포넌트를 렌더링합니다.
123123
let root;
124124
act(() => {
125125
root = create(<App value={1}/>)
126126
});
127127

128-
// make assertions on root
128+
// root를 검증합니다.
129129
expect(root.toJSON()).toMatchSnapshot();
130130

131-
// update with some different props
131+
// 몇몇의 다른 props를 업데이트합니다.
132132
act(() => {
133133
root = root.update(<App value={2}/>);
134134
})
135135

136-
// make assertions on root
136+
// root를 검증합니다.
137137
expect(root.toJSON()).toMatchSnapshot();
138138
```
139139

0 commit comments

Comments
 (0)