diff --git a/docs/react/contributing.en-US.md b/docs/react/contributing.en-US.md index 9649c4000d..7dc63cb4bc 100644 --- a/docs/react/contributing.en-US.md +++ b/docs/react/contributing.en-US.md @@ -51,7 +51,7 @@ The core team is monitoring for pull requests. We will review your pull request 1. Fork the repository and create your branch from the [correct branch](#Branch-Organization). 1. Run `npm install` in the repository root. 1. If you've fixed a bug or added code that should be tested, add tests! -1. Ensure the test suite passes (npm run test). Tip: `npm test -- --watch TestName` is helpful in development. +1. Ensure the test suite passes (npm run test). Tip: `npm test --watch TestName` is helpful in development. 1. Run `npm test -- -u` to update the [jest snapshots](http://facebook.github.io/jest/docs/en/snapshot-testing.html#snapshot-testing-with-jest) and commit these changes as well (if there are any updates). 1. Make sure your code lints (npm run lint). Tip: Lint runs automatically when you `git commit` (Use [Git Hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)). diff --git a/docs/react/contributing.zh-CN.md b/docs/react/contributing.zh-CN.md index 5816b9b025..65f1069715 100644 --- a/docs/react/contributing.zh-CN.md +++ b/docs/react/contributing.zh-CN.md @@ -51,7 +51,7 @@ Ant Design 团队会关注所有的 pull request,我们会 review 以及合并 1. 基于 [正确的分支](#分支管理) 做修改。 2. 在项目根目录下运行了 `npm install`。 3. 如果你修复了一个 bug 或者新增了一个功能,请确保写了相应的测试,这很重要。 -4. 确认所有的测试都是通过的 `npm run test`。 小贴士:开发过程中可以用 `npm test -- --watch TestName` 来运行指定的测试。 +4. 确认所有的测试都是通过的 `npm run test`。 小贴士:开发过程中可以用 `npm test --watch TestName` 来运行指定的测试。 5. 运行 `npm test -- -u` 来更新 [jest snapshot](http://facebook.github.io/jest/docs/en/snapshot-testing.html#snapshot-testing-with-jest) 并且把这些更新也提交上来(如果有的话)。 6. 确保你的代码通过了 lint 检查 `npm run lint`. 小贴士: Lint 会在你 `git commit` 的时候自动运行(通过[Git Hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks))。