Skip to content

Commit 32a848a

Browse files
committed
fix: fix some translate error and review
1 parent 176dc44 commit 32a848a

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

zh_CN/docs/recipes/code-coverage.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ coverage
6969
}
7070
```
7171

72-
例子中这里有2点比较重要。
72+
例子中有2点比较重要:
7373

7474
1. 我们忽略测试文件,因为AVA已经为你做了转换处理了。
7575

@@ -137,7 +137,7 @@ coverage
137137

138138
## HTML报告
139139

140-
NYC创建在`.nyc_ouput`文件夹中为每个进程创建一个`json`的覆盖率文件。
140+
NYC在`.nyc_ouput`文件夹中为每个进程创建一个`json`的覆盖率文件。
141141

142142
把这些文件组合成一个可阅读的HTML报告,可以通过下面的方法来做:
143143

@@ -183,6 +183,6 @@ after_success:
183183
[coveralls.io]: https://coveralls.io
184184
[`coveralls`]: https://github.com/nickmerwin/node-coveralls
185185
[`cross-env`]: https://github.com/kentcdodds/cross-env
186-
[process-isolation]: https://github.com/sindresorhus/ava#process-isolation
186+
[process-isolation]: ../../readme.md#隔离进程
187187
[`istanbul`]: https://github.com/gotwarlost/istanbul
188188
[`nyc`]: https://github.com/bcoe/nyc

zh_CN/docs/recipes/watch-mode.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -54,28 +54,27 @@ $ npm run test:watch
5454

5555
## 要求
5656

57-
AVA使用[`chokidar`]来作为文件观察期,它被配置为可选的依赖,因为`chokidar`有时候无法安装,如果`chokidar`安装失败那么观察模式就不可用,然后你将看到一条这样的信息:
57+
AVA使用[`chokidar`]来作为文件观察器,它被配置为可选的依赖库,因为`chokidar`有时候无法安装,如果`chokidar`安装失败那么观察模式就不可用,然后你将看到一条这样的信息:
5858

5959
> The optional dependency chokidar failed to install and is required for --watch. Chokidar is likely not supported on your platform.
6060
6161
请参考[`chokidar`文档][`chokidar`]了解如何解决这个问题。
6262

6363
## 源文件和测试文件
6464

65-
在AVA中*源文件**测试文件*是有差别的,正如你所想的一样,*测试文件*包含了你的测试,*源文件*是需要支持测试运行的
66-
其他所有文件,是你的源代码或者测试数据。
65+
在AVA中*源文件**测试文件*是有差别的,正如你所想的一样,*测试文件*包含了你的测试,*源文件*是需要支持测试运行的其他所有文件,是你的源代码或者测试数据。
6766

6867
默认情况下AVA观察测试文件,`package.json`和其他的`.js`文件的改变,它会忽略由[`ignore-by-default`]包提供的[特定文件夹](https://github.com/novemberborn/ignore-by-default/blob/master/index.js)下的文件。
6968

70-
你可以使用[`--source` CLI 标志]`package.json`文件的`ava`属性为源文件配置模式,注意如果你从[`ignore-by-default`]中指定了一个负模式目录,那么忽略将不再有效,所以你可能想要在你的配置里重复这些操作。
69+
你可以使用[`--source` CLI标志]`package.json`文件的`ava`属性为源文件配置模式,注意如果你从[`ignore-by-default`]中指定了一个负模式目录,那么忽略将不再有效,所以你可能想要在你的配置里重复这些操作。
7170

7271
如果你的测试会写入磁盘,那么它们会跟踪观察器来返回你的测试,这种情况下你需要使用`--source`标志。
7372

7473
## 依赖跟踪
7574

76-
AVA跟踪测试文件依赖的源文件,如果你改变的源文件只有一个测试依赖那么久只会返回这个测试,如果它不能识别哪个测试文件依赖了这个被修改的源文件,那么它会返回所有的测试。
75+
AVA跟踪测试文件依赖的源文件,如果你改变的源文件只有一个测试被依赖,那么就只会返回这个测试,如果它不能识别哪个测试文件依赖了这个被修改的源文件,那么它会返回所有的测试。
7776

78-
依赖跟踪在required模式中有效,支持自定义继承和转换,使用[`--require` CLI标志]而不是从你的测试文件来帮助你加载它们。使用`fs`模块来做的文件访问不会被跟踪
77+
依赖跟踪在required模式中有效,支持自定义继承和转换,使用[`--require` CLI标志]而不是从你的测试文件来帮助你加载它们。使用`fs`模块来访问的文件不会被跟踪
7978

8079
## 手动返回所有测试
8180

@@ -102,6 +101,6 @@ $ npm test -- --watch
102101

103102
[`chokidar`]: https://github.com/paulmillr/chokidar
104103
[`ignore-by-default`]: https://github.com/novemberborn/ignore-by-default
105-
[`--require` CLI 标志]: https://github.com/sindresorhus/ava#cli
106-
[`--source` CLI 标志]: https://github.com/sindresorhus/ava#cli
104+
[`--require` CLI标志]: https://github.com/sindresorhus/ava-docs/blob/master/zh_CN/readme.md#cli
105+
[`--source` CLI标志]: https://github.com/sindresorhus/ava-docs/blob/master/zh_CN/readme.md#cli
107106

zh_CN/docs/recipes/when-to-use-plan.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,5 @@ testData.forEach(testDefinition => {
136136

137137
## 总结
138138

139-
`t.plan()`有很多有效的使用方法,但不应该被盲目使用。一个好的经验法则是你的*测试*没有简单的,容易推断的,代码流你可以使用它。测试在callback里带有断言,`if`/`then`语句,`for`/`while`循环,并且(在一些情况下)`try`/`catch`块,都可以考虑使用`t.plan()`
139+
`t.plan()`有很多有效的使用方法,但不应该被盲目使用。一个好的经验法则是你的*测试*没有简单的,容易推断的,代码流的话你可以使用它。测试在callback里带有断言,`if`/`then`语句,`for`/`while`循环,并且(在一些情况下)`try`/`catch`块,都可以考虑使用`t.plan()`
140140

0 commit comments

Comments
 (0)