docs: fix spelling and grammar errors (#18910)

This commit is contained in:
Charles Kerr 2019-06-21 16:19:21 -05:00 committed by GitHub
parent bef9610f6a
commit 792f6b246c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 40 additions and 40 deletions

View file

@ -2,7 +2,7 @@
To write automated tests for your Electron app, you will need a way to "drive" your application. [Spectron](https://electronjs.org/spectron) is a commonly-used solution which lets you emulate user actions via [WebDriver](http://webdriver.io/). However, it's also possible to write your own custom driver using node's builtin IPC-over-STDIO. The benefit of a custom driver is that it tends to require less overhead than Spectron, and lets you expose custom methods to your test suite.
To create a custom driver, we'll use nodejs' [child_process](https://nodejs.org/api/child_process.html) API. The test suite will spawn the Electron process, then establish a simple messaging protocol:
To create a custom driver, we'll use Node.js' [child_process](https://nodejs.org/api/child_process.html) API. The test suite will spawn the Electron process, then establish a simple messaging protocol:
```js
var childProcess = require('child_process')
@ -22,7 +22,7 @@ appProcess.on('message', (msg) => {
appProcess.send({ my: 'message' })
```
From within the Electron app, you can listen for messages and send replies using the nodejs [process](https://nodejs.org/api/process.html) API:
From within the Electron app, you can listen for messages and send replies using the Node.js [process](https://nodejs.org/api/process.html) API:
```js
// listen for IPC messages from the test suite