Skip to content

[docs][en] typos & formats #430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Feb 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/en/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
* [text](api/wrapper/text.md)
* [trigger](api/wrapper/trigger.md)
* [update](api/wrapper/update.md)
* [visible](api/wrapper/visible.md)
* [isVisible](api/wrapper/isVisible.md)
* [WrapperArray](api/wrapper-array/README.md)
* [at](api/wrapper-array/at.md)
* [contains](api/wrapper-array/contains.md)
Expand All @@ -66,7 +66,7 @@
* [setProps](api/wrapper-array/setProps.md)
* [trigger](api/wrapper-array/trigger.md)
* [update](api/wrapper-array/update.md)
* [visible](api/wrapper-array/visible.md)
* [isVisible](api/wrapper-array/isVisible.md)
* [components](api/components/README.md)
* [TransitionStub](api/components/TransitionStub.md)
* [TransitionGroupStub](api/components/TransitionGroupStub.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/en/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* [text](./wrapper/text.md)
* [trigger](./wrapper/trigger.md)
* [update](./wrapper/update.md)
* [visible](./wrapper/visible.md)
* [isVisible](./wrapper/isVisible.md)
* [WrapperArray](./wrapper-array/README.md)
* [at](./wrapper-array/at.md)
* [contains](./wrapper-array/contains.md)
Expand All @@ -50,7 +50,7 @@
* [setProps](./wrapper-array/setProps.md)
* [trigger](./wrapper-array/trigger.md)
* [update](./wrapper-array/update.md)
* [visible](./wrapper-array/visible.md)
* [isVisible](./wrapper-array/isVisible.md)
* [components](./components/README.md)
* [TransitionStub](./components/TransitionStub.md)
* [TransitionGroupStub](./components/TransitionGroupStub.md)
Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/components/RouterLinkStub.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# RouterLinkStub
# `RouterLinkStub`

A component to stub the Vue Router `router-link` component.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/components/TransitionGroupStub.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TransitionGroupStub
# `TransitionGroupStub`

A component to stub the `transition-group` component. Instead of performing transitions asynchronously, it returns the child components synchronously.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/components/TransitionStub.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# TransitionStub
# `TransitionStub`

A component to stub the `transition` component. Instead of performing transitions asynchronously, it returns the child component synchronously.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# WrapperArray
# `WrapperArray`

A `WrapperArray` is an object that contains an array of [`Wrappers`](../wrapper/README.md), and methods to test the `Wrappers`.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/at.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# at(index)
# `at(index)`

Returns `Wrapper` at `index` passed. Uses zero based numbering (i.e. first item is at index 0).

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/contains.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# contains(selector)
# `contains(selector)`

Assert every wrapper in `WrapperArray` contains selector.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/destroy.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# destroy()
# `destroy()`

Destroys each Vue `Wrapper` in `WrapperArray`.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/filter.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# filter(predicate)
# `filter(predicate)`

Filter `WrapperArray` with a predicate function on `Wrapper` objects.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/is.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# is(selector)
# `is(selector)`

Assert every `Wrapper` in `WrapperArray` DOM node or `vm` matches [selector](../selectors.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/isEmpty.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# isEmpty()
# `isEmpty()`

Assert every `Wrapper` in `WrapperArray` does not contain child node.

Expand Down
4 changes: 2 additions & 2 deletions docs/en/api/wrapper-array/isVisible.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# visible()
# `isVisible()`

Assert every `Wrapper` in `WrapperArray` is visible.

Expand All @@ -11,7 +11,7 @@ This can be used to assert that a component is hidden by `v-show`.
- **Example:**

```js
import { mount } from 'vue-test-utils'
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/isVueInstance.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# isVueInstance()
# `isVueInstance()`

Assert every `Wrapper` in `WrapperArray` is Vue instance.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/setData.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# setData(data)
# `setData(data)`

Sets `Wrapper` `vm` data and forces update on each `Wrapper` in `WrapperArray`.

Expand Down
3 changes: 1 addition & 2 deletions docs/en/api/wrapper-array/setMethods.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

# setMethods(methods)
# `setMethods(methods)`

Sets `Wrapper` `vm` methods and forces update on each `Wrapper` in `WrapperArray`.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/setProps.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# setProps(props)
# `setProps(props)`

Sets `Wrapper` `vm` props and forces update on each `Wrapper` in `WrapperArray`.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/trigger.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# trigger(eventName)
# `trigger(eventName)`

Triggers an event on every `Wrapper` in the `WrapperArray` DOM node.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper-array/update.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# update()
# `update()`

Force root Vue component of each `Wrapper` in `WrapperArray` to re-render.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/attributes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# attributes()
# `attributes()`

Returns `Wrapper` DOM node attribute object.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/classes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# classes()
# `classes()`

Return `Wrapper` DOM node classes.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/destroy.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# destroy()
# `destroy()`

Destroys a Vue component instance.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/emitted.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# emitted()
# `emitted()`

Return an object containing custom events emitted by the `Wrapper` `vm`.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/emittedByOrder.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# emittedByOrder()
# `emittedByOrder()`

Return an Array containing custom events emitted by the `Wrapper` `vm`.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/exists.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# exists()
# `exists()`

Assert `Wrapper` or `WrapperArray` exists.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/find.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# find(selector)
# `find(selector)`

Returns [`Wrapper`](README.md) of first DOM node or Vue component matching selector.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/findAll.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# findAll(selector)
# `findAll(selector)`

Returns a [`WrapperArray`](../wrapper-array/README.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/html.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# html()
# `html()`

Returns HTML of `Wrapper` DOM node as a string.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/is.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# is(selector)
# `is(selector)`

Assert `Wrapper` DOM node or `vm` matches [selector](../selectors.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/isEmpty.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# isEmpty()
# `isEmpty()`

Assert `Wrapper` does not contain child node.

Expand Down
4 changes: 2 additions & 2 deletions docs/en/api/wrapper/isVisible.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# isVisible()
# `isVisible()`

Assert `Wrapper` is visible.

Expand All @@ -11,7 +11,7 @@ This can be used to assert that a component is hidden by `v-show`.
- **Example:**

```js
import { mount } from 'vue-test-utils'
import { mount } from '@vue/test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/isVueInstance.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# isVueInstance()
# `isVueInstance()`

Assert `Wrapper` is Vue instance.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/name.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# name()
# `name()`

Returns component name if `Wrapper` contains a Vue instance, or the tag name of `Wrapper` DOM node if `Wrapper` does not contain a Vue instance.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/props.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# props()
# `props()`

Return `Wrapper` `vm` props object.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/setData.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# setData(data)
# `setData(data)`

Sets `Wrapper` `vm` data and forces update.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/setMethods.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# setMethods(methods)
# `setMethods(methods)`

Sets `Wrapper` `vm` methods and forces update.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/setProps.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# setProps(props)
# `setProps(props)`

- **Arguments:**
- `{Object} props`
Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/text.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# text()
# `text()`

Returns text content of `Wrapper`.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/trigger.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# trigger(eventName)
# `trigger(eventName)`

Triggers an event on the `Wrapper` DOM node.

Expand Down
2 changes: 1 addition & 1 deletion docs/en/api/wrapper/update.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# update()
# `update()`

Force root Vue component to re-render.

Expand Down
6 changes: 3 additions & 3 deletions docs/en/guides/testing-SFCs-with-karma.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Next we need to define a test script in our `package.json`.

### Karma Configuration

Create a karma.conf.js file in the index of the project:
Create a `karma.conf.js` file in the index of the project:

```js
// karma.conf.js
Expand Down Expand Up @@ -138,7 +138,7 @@ Install `karma-coverage`, `babel-plugin-istanbul`, and `cross-env`:
npm install --save-dev karma-coverage cross-env
```

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:
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:

```
npm install --save-dev babel-plugin-istanbul
Expand All @@ -160,7 +160,7 @@ Update your `.babelrc` file to use `babel-plugin-istanbul` when `BABEL_ENV` is s
}
```

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

```js
// karma.conf.js
Expand Down
2 changes: 1 addition & 1 deletion docs/en/guides/using-with-vue-router.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ shallow(Component, {
})
```

> **Note:** Installing Vue Router on a localVue also adds `$route` and `$router` as read-only properties to a localVue. This means you can not use the `mocks` option to overwrite `$route` and `$router` when mounting a component using a localVue with VueRouter installed.
> **Note:** Installing Vue Router on a `localVue` also adds `$route` and `$router` as read-only properties to a `localVue`. This means you can not use the `mocks` option to overwrite `$route` and `$router` when mounting a component using a `localVue` with Vue Router installed.

## Testing components that use `router-link` or `router-view`

Expand Down
4 changes: 2 additions & 2 deletions docs/en/guides/using-with-vuex.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ Getters, mutations, and actions are all JavaScript functions, so we can test the

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.

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

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

Expand Down Expand Up @@ -338,7 +338,7 @@ The benefit of testing creating a running store instance is we don't have to moc

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

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:
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:

```js
// store-config.spec.js
Expand Down