Skip to content

Commit ac4f82f

Browse files
Jinjiangeddyerburgh
authored andcommitted
docs: fix typos and formattings (#190)
* [en] typo * typo * typo * [en] typo * [en] updated contents * typo * [en] typo + format * [en] typo
1 parent 6f5f1b0 commit ac4f82f

24 files changed

+108
-92
lines changed

docs/en/api/README.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
* [emitted](./wrapper/emitted.md)
1818
* [emittedByOrder](./wrapper/emittedByOrder.md)
1919
* [find](./wrapper/find.md)
20+
* [findAll](./wrapper/findAll.md)
2021
* [hasAttribute](./wrapper/hasAttribute.md)
2122
* [hasClass](./wrapper/hasClass.md)
2223
* [hasProp](./wrapper/hasProp.md)
@@ -26,11 +27,14 @@
2627
* [isEmpty](./wrapper/isEmpty.md)
2728
* [isVueInstance](./wrapper/isVueInstance.md)
2829
* [name](./wrapper/name.md)
29-
* [update](./wrapper/update.md)
30+
* [setComputed](./wrapper/setComputed.md)
3031
* [setData](./wrapper/setData.md)
32+
* [setMethods](./wrapper/setMethods.md)
3133
* [setProps](./wrapper/setProps.md)
3234
* [text](./wrapper/text.md)
3335
* [trigger](./wrapper/trigger.md)
36+
* [update](./wrapper/update.md)
37+
* [destroy](./wrapper/destroy.md)
3438
* [WrapperArray](./wrapper-array/README.md)
3539
* [at](./wrapper-array/at.md)
3640
* [contains](./wrapper-array/contains.md)
@@ -41,9 +45,16 @@
4145
* [is](./wrapper-array/is.md)
4246
* [isEmpty](./wrapper-array/isEmpty.md)
4347
* [isVueInstance](./wrapper-array/isVueInstance.md)
44-
* [update](./wrapper-array/update.md)
48+
* [setComputed](./wrapper-array/setComputed.md)
4549
* [setData](./wrapper-array/setData.md)
50+
* [setMethods](./wrapper-array/setMethods.md)
4651
* [setProps](./wrapper-array/setProps.md)
4752
* [trigger](./wrapper-array/trigger.md)
53+
* [update](./wrapper-array/update.md)
54+
* [destroy](./wrapper-array/destroy.md)
55+
* [components](./components/README.md)
56+
* [TransitionStub](./components/TransitionStub.md)
57+
* [TransitionGroupStub](./components/TransitionGroupStub.md)
4858
* [createLocalVue](./createLocalVue.md)
4959
* [Selectors](./selectors.md)
60+
* [config](./config.md)

docs/en/api/components/TransitionGroupStub.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,16 @@
22

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

5-
This is set to stub all `transition-group` components by default in the vue-test-utils config. To use the built-in `transition-group` wrapper component set `config.stubs[transition-group]` to false:
5+
This is set to stub all `transition-group` components by default in the `vue-test-utils` config. To use the built-in `transition-group` wrapper component set `config.stubs['transition-group']` to false:
66

77
```js
88
import VueTestUtils from 'vue-test-utils'
99

10-
VueTestUtils.config.stubs.transition = false
10+
VueTestUtils.config.stubs['transition-group'] = false
1111
```
1212

1313
To reset it to stub transition components:
14+
1415
```js
1516
import VueTestUtils, { TransitionGroupStub } from 'vue-test-utils'
1617

docs/en/api/createLocalVue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# createLocalVue()
1+
# `createLocalVue()`
22

33
- **Returns:**
44
- `{Component}`
@@ -7,7 +7,7 @@
77

88
`createLocalVue` returns a Vue class for you to add components, mixins and install plugins without polluting the global Vue class.
99

10-
Use it with `options.localVue`
10+
Use it with `options.localVue`:
1111

1212
```js
1313
import { createLocalVue, shallow } from 'vue-test-utils'

docs/en/api/mount.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# mount(component {, options}])
1+
# `mount(component {, options}])`
22

33
- **Arguments:**
44

@@ -31,6 +31,7 @@ describe('Foo', () => {
3131
})
3232
})
3333
```
34+
3435
**With Vue options:**
3536

3637
```js
@@ -80,7 +81,7 @@ describe('Foo', () => {
8081
const wrapper = mount(Foo, {
8182
slots: {
8283
default: [Bar, FooBar],
83-
fooBar: FooBar, // Will match <slot name="FooBar" />,
84+
fooBar: FooBar, // Will match `<slot name="FooBar" />`.
8485
foo: '<div />'
8586
}
8687
})

docs/en/api/options.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ Vue options are passed to the component when a new instance is created. , e.g. `
66

77
## `vue-test-utils` Specific Mounting Options
88

9-
- [context](#context)
10-
- [slots](#slots)
11-
- [stubs](#stubs)
12-
- [mocks](#mocks)
13-
- [localVue](#localvue)
14-
- [attachToDocument](#attachtodocument)
15-
- [attrs](#attrs)
16-
- [listeners](#listeners)
17-
- [clone](#clone)
9+
- [`context`](#context)
10+
- [`slots`](#slots)
11+
- [`stubs`](#stubs)
12+
- [`mocks`](#mocks)
13+
- [`localVue`](#localvue)
14+
- [`attachToDocument`](#attachtodocument)
15+
- [`attrs`](#attrs)
16+
- [`listeners`](#listeners)
17+
- [`clone`](#clone)
1818

1919
### `context`
2020

@@ -50,7 +50,7 @@ import Bar from './Bar.vue'
5050
const wrapper = shallow(Component, {
5151
slots: {
5252
default: [Foo, Bar],
53-
fooBar: Foo, // Will match <slot name="FooBar" />,
53+
fooBar: Foo, // Will match `<slot name="FooBar" />`.
5454
foo: '<div />'
5555
}
5656
})
@@ -106,7 +106,7 @@ expect(wrapper.vm.$route.path).toBe($route.path)
106106

107107
- type: `Vue`
108108

109-
A local copy of Vue created by [createLocalVue](./createLocalVue.md) to use when mounting the component. Installing plugins on this copy of Vue prevents polluting the original `Vue` copy.
109+
A local copy of Vue created by [`createLocalVue`](./createLocalVue.md) to use when mounting the component. Installing plugins on this copy of `Vue` prevents polluting the original `Vue` copy.
110110

111111
Example:
112112

@@ -162,4 +162,4 @@ Clones component before mounting if `true`, which avoids mutating the original c
162162

163163
`options.mocks` (`Object`): Add globals to Vue instance.
164164

165-
`options.localVue` (`Object`): vue class to use in `mount`. See [createLocalVue](createLocalVue.md)
165+
`options.localVue` (`Object`): `Vue` class to use in `mount`. See [`createLocalVue`](createLocalVue.md).

docs/en/api/selectors.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ A lot of methods take a selector as an argument. A selector can either be a CSS
44

55
## CSS Selectors
66

7-
mount handles any valid CSS selector:
7+
Mount handles any valid CSS selector:
88

9-
- tag selectors (div, foo, bar)
10-
- class selectors (.foo, .bar)
11-
- attribute selectors ([foo], [foo="bar"])
12-
- id selectors (#foo, #bar)
13-
- pseudo selectors (div:first-of-type)
9+
- tag selectors (`div`, `foo`, `bar`)
10+
- class selectors (`.foo`, `.bar`)
11+
- attribute selectors (`[foo]`, `[foo="bar"]`)
12+
- id selectors (`#foo`, `#bar`)
13+
- pseudo selectors (`div:first-of-type`)
1414

1515
You can also use combinators:
1616

17-
- direct descendant combinator (div > #bar > .foo)
18-
- general descendant combinator (div #bar .foo)
19-
- adjacent sibling selector (div + .foo)
20-
- general sibling selector (div ~ .foo)
17+
- direct descendant combinator (`div > #bar > .foo`)
18+
- general descendant combinator (`div #bar .foo`)
19+
- adjacent sibling selector (`div + .foo`)
20+
- general sibling selector (`div ~ .foo`)
2121

2222
## Vue Components
2323

2424
Vue components are also valid selectors.
2525

26-
vue-test-utils uses the `name` property to search the instance tree for matching Vue components.
26+
`vue-test-utils` uses the `name` property to search the instance tree for matching Vue components.
2727

2828
```js
2929
// Foo.vue
3030

31-
export default{
31+
export default {
3232
name: 'FooComponent'
3333
}
3434
```
@@ -46,7 +46,7 @@ expect(wrapper.is(Foo)).toBe(true)
4646

4747
### Ref
4848

49-
Using a find option object, vue-test-utils allows for selecting elements by $ref on wrapper components.
49+
Using a find option object, `vue-test-utils` allows for selecting elements by `$ref` on wrapper components.
5050

5151
```js
5252
const buttonWrapper = wrapper.find({ ref: 'myButton' });

docs/en/api/shallow.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# shallow(component {, options}])
1+
# `shallow(component {, options}])`
22

33
- **Arguments:**
44

docs/en/api/wrapper-array/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# WrapperArray
22

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

55
- **Properties:**
66

77
`length` `number`: the number of `Wrappers` contained in the `WrapperArray`
88

99
- **Methods:**
1010

11-
There is a detailed list of methods in the WrapperArray section of the docs.
11+
There is a detailed list of methods in the `WrapperArray` section of the docs.

docs/en/api/wrapper-array/destroy.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ const divArray = wrapper.findAll('div')
1414
expect(divArray.contains('p')).toBe(true)
1515
divArray.destroy()
1616
expect(divArray.contains('p')).toBe(false)
17-
1817
```

docs/en/api/wrapper-array/setComputed.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Sets `Wrapper` `vm` computed and forces update on each `Wrapper` in `WrapperArray`.
55

66
**Note every `Wrapper` must contain a Vue instance.**
7-
**Note every Vue instance must already have the computed properties passed to setComputed.**
7+
**Note every Vue instance must already have the computed properties passed to `setComputed`.**
88

99
- **Arguments:**
1010
- `{Object} computed properties`

0 commit comments

Comments
 (0)