-
-
Notifications
You must be signed in to change notification settings - Fork 508
translating reference-test-renderer.md #190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a632685
Update reference-test-renderer.md
toy9910 24d7da3
Merge branch 'master' into master
hg-pyun 4063d79
Update reference-test-renderer.md
toy9910 9f88ecd
Update reference-test-renderer.md
toy9910 5953197
Update reference-test-renderer.md
toy9910 183299d
Update reference-test-renderer.md
toy9910 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -113,27 +113,27 @@ TestRenderer.create(element, options); | |||||
TestRenderer.act(callback); | ||||||
``` | ||||||
|
||||||
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`. | ||||||
[`react-dom/test-utils`에 `act()`](/docs/test-utils.html#act)와 비슷하게, `TestRenderer.act`는 실행을 위한 컴포넌트들을 준비합니다. `TestRenderer.create` 와 `trestRenderer.update`를 호출을 보호하기 위해 이 버전의 `act()`를 사용하십시오. | ||||||
|
||||||
```javascript | ||||||
import {create, act} from 'react-test-renderer'; | ||||||
import App from './app.js'; // The component being tested | ||||||
|
||||||
// render the component | ||||||
// 컴포넌트를 랜더링합니다. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
let root; | ||||||
act(() => { | ||||||
root = create(<App value={1}/>) | ||||||
}); | ||||||
|
||||||
// make assertions on root | ||||||
// root를 검증합니다. | ||||||
expect(root.toJSON()).toMatchSnapshot(); | ||||||
|
||||||
// update with some different props | ||||||
// 몇몇의 다른 프로퍼티즈들을 업데이트합니다. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
props은 번역하면 안되는 용어라 수정 부탁드려요. (Translate Glossary) |
||||||
act(() => { | ||||||
root = root.update(<App value={2}/>); | ||||||
}) | ||||||
|
||||||
// make assertions on root | ||||||
// root를 검증합니다. | ||||||
expect(root.toJSON()).toMatchSnapshot(); | ||||||
``` | ||||||
|
||||||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
실행
보다는단언
,검증
으로 번역할 수 있는데 아래에 번역해놓으신검증
으로 통일할게요.act
는 테스트할 때 컴포넌트의 렌더링을 갱신하는 코드를 호출하기 위해 사용합니다.act
로 인해 감싸지게 되는데보호
의 의미보다는 갱신이 확실하게 되도록 하기 위해 감싸지기 때문에감싸주세요.
정도도 충분하다고 생각해서 제안드려봐요.