Skip to content
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

docs(testing): translate testing-environments #149

Merged
merged 1 commit into from Mar 27, 2020

Conversation

neighborhood999
Copy link
Member

No description provided.

@netlify
Copy link

netlify bot commented Mar 9, 2020

Deploy preview for zh-hant-reactjs-org ready!

Built with commit 5fd919c

https://deploy-preview-149--zh-hant-reactjs-org.netlify.com

@neighborhood999 neighborhood999 force-pushed the translate/testing-environments branch 3 times, most recently from 88b6988 to ba88266 Compare March 13, 2020 03:01
@neighborhood999 neighborhood999 marked this pull request as ready for review March 13, 2020 03:03
Copy link
Member

@bugtender bugtender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍LGTM. Just some suggestions.

content/docs/testing-environments.md Outdated Show resolved Hide resolved

Sometimes, you may not want to mock timers. For example, maybe you're testing an animation, or interacting with an endpoint that's sensitive to timing (like an API rate limiter). Libraries with timer mocks let you enable and disable them on a per test/suite basis, so you can explicitly choose how these tests would run.
有時候你可能不想要 mock timer。例如,或許你想要測試一個 animation,或是與一個對時間較敏感的 endpoint 交互(像是 API rate limiter)。函式庫的 timer mock 讓你啟用和關閉它們在每個測試的基礎上,所以你可以明確的選擇這些測試的執行方式。
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
有時候你可能不想要 mock timer。例如,或許你想要測試一個 animation,或是與一個對時間較敏感的 endpoint 交互(像是 API 的 rate limiter)。函式庫的 timer mock 讓你啟用和關閉它們在每個測試的基礎上,所以你可以明確的選擇這些測試的執行方式。
有時候你可能不想要 mock timer。例如,或許你想要測試一個 animation,或是與一個對時間較敏感的 endpoint 交互(像是 API 的 rate limiter)。函式庫的 timer mock 讓你在每個測試的基礎上啟用和關閉它們,所以你可以明確的選擇這些測試的執行方式。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I updated.

content/docs/testing-environments.md Outdated Show resolved Hide resolved
@neighborhood999 neighborhood999 merged commit 0c29d6f into master Mar 27, 2020
@neighborhood999 neighborhood999 deleted the translate/testing-environments branch March 27, 2020 02:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants