Skip to content

Commit 95c618a

Browse files
committed
[docs][en] formats
1 parent 59689f5 commit 95c618a

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

docs/en/guides/testing-SFCs-with-karma.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Next we need to define a test script in our `package.json`.
2929

3030
### Karma Configuration
3131

32-
Create a karma.conf.js file in the index of the project:
32+
Create a `karma.conf.js` file in the index of the project:
3333

3434
```js
3535
// karma.conf.js
@@ -138,7 +138,7 @@ Install `karma-coverage`, `babel-plugin-istanbul`, and `cross-env`:
138138
npm install --save-dev karma-coverage cross-env
139139
```
140140

141-
We're going to use `cross-env` to set a `BABEL_ENV` environment variable. This way we can use babel-plugin-istanbul when we're compiling for our tests—we don't want to include `babel-plugin-istnabul` when we compile our production code:
141+
We're going to use `cross-env` to set a `BABEL_ENV` environment variable. This way we can use `babel-plugin-istanbul` when we're compiling for our tests—we don't want to include `babel-plugin-istnabul` when we compile our production code:
142142

143143
```
144144
npm install --save-dev babel-plugin-istanbul
@@ -160,7 +160,7 @@ Update your `.babelrc` file to use `babel-plugin-istanbul` when `BABEL_ENV` is s
160160
}
161161
```
162162

163-
Now update the karma.conf.js file to use coverage. Add `coverage` to the reporters array, and add a coverageReporter field:
163+
Now update the `karma.conf.js` file to use coverage. Add `coverage` to the `reporters` array, and add a `coverageReporter` field:
164164

165165
```js
166166
// karma.conf.js

docs/en/guides/using-with-vuex.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ Getters, mutations, and actions are all JavaScript functions, so we can test the
290290

291291
The benefit to testing getters, mutations, and actions separately is that your unit tests are detailed. When they fail, you know exactly what is wrong with your code. The downside is that you will need to mock Vuex funtions, like `commit` and `dispatch`. This can lead to a situation where your unit tests pass, but your production code fails because your mocks are incorrect.
292292

293-
We'll create two test files, mutations.spec.js and getters.spec.js:
293+
We'll create two test files, `mutations.spec.js` and `getters.spec.js`:
294294

295295
First, let's test the `increment` mutations:
296296

@@ -339,7 +339,7 @@ The benefit of testing creating a running store instance is we don't have to moc
339339

340340
The downside is that when a test breaks, it can be difficult to find where the problem is.
341341

342-
Let's write a test. When we create a store, we'll use `localVue` to avoid polluting the Vue base constructor. The test creates a store using the store-config.js export:
342+
Let's write a test. When we create a store, we'll use `localVue` to avoid polluting the Vue base constructor. The test creates a store using the `store-config.js` export:
343343

344344
```js
345345
import mutations from './mutations'

0 commit comments

Comments
 (0)