Skip to content

Commit a4b5f19

Browse files
committed
end_to_end_testing
1 parent 58fe030 commit a4b5f19

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/cn/end-to-end_testing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# 端对端测试
22

3-
electron-vue 使用 [Spectron](http://electron.atom.io/spectron/)[Mocha](https://mochajs.org/) \([Chai](http://chaijs.com/)\) 作为测试框架,进行端到端测试。包括 `expect``should` 以及 `assert` 在内的 Mocha 和 Chai 的 API 在全局范围内可用。
3+
electron-vue 使用 [Spectron](http://electron.atom.io/spectron/)[Mocha](https://mochajs.org/) \([Chai](http://chaijs.com/)\) 作为端到端测试的框架。包括 `expect``should` 以及 `assert` 在内的 Mocha 和 Chai 的 API 在全局范围内可用。
44

55
### 运行测试
66

@@ -24,15 +24,15 @@ my-project
2424
└─ └─ └─ utils.js
2525
```
2626

27-
**在大多数情况下,你可以忽略** `index.js` **并专注于编写** `specs/` ****
27+
**在大多数情况下,你可以忽略** `index.js` **只专注于编写** `specs/` ****
2828

2929
#### `specs/`
3030

3131
这个目录里面是编写实际测试代码的地方。由于 `babel-register` 的强大功能,你可以完全依照 ES2015 进行编写。
3232

3333
#### `index.js`
3434

35-
这是 Mocha 入口文件,并收集编写在 `specs/` 内的所有测试代码用于测试。
35+
这是 Mocha 入口文件,并收集在 `specs/` 内的所有测试代码用于测试。
3636

3737
#### `utils.js`
3838

@@ -44,4 +44,4 @@ Spectron 是使用 [ChromeDriver](https://sites.google.com/a/chromium.org/chrome
4444

4545
#### WebDriverIO 的使用
4646

47-
如 Spectron 的 [文档](https://github.com/electron/spectron#client) 中所述,可以通过访问 `this.app.client` 来访问 [WebDriverIO APIs](http://webdriver.io/api.html)。 由于 electron-vue 使用了 Mocha,`this``afterEach``beforeEach``it` 之间共享。 因此,重要的是要注意,ES2015 的箭头函数不能在某些情况下使用,因为 `this` 的语境将被覆盖 \([更多信息](https://mochajs.org/#arrow-functions)\)
47+
如 Spectron 的 [文档](https://github.com/electron/spectron#client) 中所述,可以通过访问 `this.app.client` 来访问 [WebDriverIO APIs](http://webdriver.io/api.html)。 由于 electron-vue 使用了 Mocha,`this``afterEach``beforeEach``it` 之间共享。 因此,值得注意的是,ES2015 的箭头函数不能在某些情况下使用,因为 `this` 的语境将被覆盖 \([更多信息](https://mochajs.org/#arrow-functions)\)

0 commit comments

Comments
 (0)