Skip to content

Commit 43310db

Browse files
38elementseddyerburgh
authored andcommitted
docs: update docs/ja (#250)
* Update docs/ja * Update README.md
1 parent 314ab4f commit 43310db

File tree

17 files changed

+95
-170
lines changed

17 files changed

+95
-170
lines changed

docs/ja/README.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,23 +24,24 @@
2424
- [attrs](api/options.md#attrs)
2525
- [listeners](api/options.md#listeners)
2626
- [clone](api/options.md#clone)
27+
- [provide](api/options.md#provide)
2728
* [Wrapper](api/wrapper/README.md)
29+
* [attributes](api/wrapper/attributes.md)
30+
* [classes](api/wrapper/classes.md)
2831
* [contains](api/wrapper/contains.md)
2932
* [emitted](api/wrapper/emitted.md)
3033
* [emittedByOrder](api/wrapper/emittedByOrder.md)
3134
* [exists](api/wrapper/exists.md)
3235
* [destroy](api/wrapper/destroy.md)
3336
* [find](api/wrapper/find.md)
3437
* [findAll](api/wrapper/findAll.md)
35-
* [hasAttribute](api/wrapper/hasAttribute.md)
36-
* [hasClass](api/wrapper/hasClass.md)
37-
* [hasProp](api/wrapper/hasProp.md)
3838
* [hasStyle](api/wrapper/hasStyle.md)
3939
* [html](api/wrapper/html.md)
4040
* [is](api/wrapper/is.md)
4141
* [isEmpty](api/wrapper/isEmpty.md)
4242
* [isVueInstance](api/wrapper/isVueInstance.md)
4343
* [name](api/wrapper/name.md)
44+
* [props](api/wrapper/props.md)
4445
* [setComputed](api/wrapper/setComputed.md)
4546
* [setData](api/wrapper/setData.md)
4647
* [setMethods](api/wrapper/setMethods.md)
@@ -53,9 +54,6 @@
5354
* [contains](api/wrapper-array/contains.md)
5455
* [exists](api/wrapper/exists.md)
5556
* [destroy](api/wrapper-array/destroy.md)
56-
* [hasAttribute](api/wrapper-array/hasAttribute.md)
57-
* [hasClass](api/wrapper-array/hasClass.md)
58-
* [hasProp](api/wrapper-array/hasProp.md)
5957
* [hasStyle](api/wrapper-array/hasStyle.md)
6058
* [is](api/wrapper-array/is.md)
6159
* [isEmpty](api/wrapper-array/isEmpty.md)

docs/ja/SUMMARY.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,24 @@
2222
- [attrs](api/options.md#attrs)
2323
- [listeners](api/options.md#listeners)
2424
- [clone](api/options.md#clone)
25+
- [provide](api/options.md#provide)
2526
* [Wrapper](api/wrapper/README.md)
27+
* [attributes](api/wrapper/attributes.md)
28+
* [classes](api/wrapper/classes.md)
2629
* [contains](api/wrapper/contains.md)
2730
* [emitted](api/wrapper/emitted.md)
2831
* [emittedByOrder](api/wrapper/emittedByOrder.md)
2932
* [exists](api/wrapper/exists.md)
3033
* [destroy](api/wrapper/destroy.md)
3134
* [find](api/wrapper/find.md)
3235
* [findAll](api/wrapper/findAll.md)
33-
* [hasAttribute](api/wrapper/hasAttribute.md)
34-
* [hasClass](api/wrapper/hasClass.md)
35-
* [hasProp](api/wrapper/hasProp.md)
3636
* [hasStyle](api/wrapper/hasStyle.md)
3737
* [html](api/wrapper/html.md)
3838
* [is](api/wrapper/is.md)
3939
* [isEmpty](api/wrapper/isEmpty.md)
4040
* [isVueInstance](api/wrapper/isVueInstance.md)
4141
* [name](api/wrapper/name.md)
42+
* [props](api/wrapper/props.md)
4243
* [setComputed](api/wrapper/setComputed.md)
4344
* [setData](api/wrapper/setData.md)
4445
* [setMethods](api/wrapper/setMethods.md)
@@ -51,9 +52,6 @@
5152
* [contains](api/wrapper-array/contains.md)
5253
* [exists](api/wrapper/exists.md)
5354
* [destroy](api/wrapper-array/destroy.md)
54-
* [hasAttribute](api/wrapper-array/hasAttribute.md)
55-
* [hasClass](api/wrapper-array/hasClass.md)
56-
* [hasProp](api/wrapper-array/hasProp.md)
5755
* [hasStyle](api/wrapper-array/hasStyle.md)
5856
* [is](api/wrapper-array/is.md)
5957
* [isEmpty](api/wrapper-array/isEmpty.md)

docs/ja/api/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
* [mount](./mount.md)
44
* [shallow](./shallow.md)
5-
* [Mounting Options](./options.md)
5+
* [マウンティングオプション](./options.md)
66
- [context](./options.md#context)
77
- [slots](./options.md#slots)
88
- [stubs](./options.md#stubs)
@@ -12,7 +12,10 @@
1212
- [attrs](./options.md#attrs)
1313
- [listeners](./options.md#listeners)
1414
- [clone](./options.md#clone)
15+
- [provide](./options.md#provide)
1516
* [Wrapper](./wrapper/README.md)
17+
* [attributes](./wrapper/attributes.md)
18+
* [classes](./wrapper/classes.md)
1619
* [contains](./wrapper/contains.md)
1720
* [emitted](./wrapper/emitted.md)
1821
* [emittedByOrder](./wrapper/emittedByOrder.md)
@@ -29,6 +32,7 @@
2932
* [isEmpty](./wrapper/isEmpty.md)
3033
* [isVueInstance](./wrapper/isVueInstance.md)
3134
* [name](./wrapper/name.md)
35+
* [props](./wrapper/props.md)
3236
* [setComputed](./wrapper/setComputed.md)
3337
* [setData](./wrapper/setData.md)
3438
* [setMethods](./wrapper/setMethods.md)
@@ -41,9 +45,6 @@
4145
* [contains](./wrapper-array/contains.md)
4246
* [exists](./wrapper/exists.md)
4347
* [destroy](./wrapper-array/destroy.md)
44-
* [hasAttribute](./wrapper-array/hasAttribute.md)
45-
* [hasClass](./wrapper-array/hasClass.md)
46-
* [hasProp](./wrapper-array/hasProp.md)
4748
* [hasStyle](./wrapper-array/hasStyle.md)
4849
* [is](./wrapper-array/is.md)
4950
* [isEmpty](./wrapper-array/isEmpty.md)
@@ -57,6 +58,6 @@
5758
* [コンポーネント](./components/README.md)
5859
* [TransitionStub](./components/TransitionStub.md)
5960
* [TransitionGroupStub](./components/TransitionGroupStub.md)
60-
* [createLocalVue](./createLocalVue.md)
6161
* [セレクタ](./selectors.md)
62+
* [createLocalVue](./createLocalVue.md)
6263
* [config](./config.md)

docs/ja/api/mount.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,8 +121,8 @@ import Faz from './Faz.vue'
121121
describe('Foo', () => {
122122
it('renders a div', () => {
123123
const wrapper = mount(Foo, {
124-
stub: {
125-
Bar: '<div class="stubbed />',
124+
stubs: {
125+
Bar: '<div class="stubbed" />',
126126
BarFoo: true,
127127
FooBar: Faz
128128
}

docs/ja/api/options.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
- [attrs](#attrs)
1616
- [listeners](#listeners)
1717
- [clone](#clone)
18+
- [provide](#provide)
1819

1920
### `context`
2021

@@ -163,3 +164,10 @@ expect(wrapper.vm.$route).toBeInstanceOf(Object)
163164
`options.mocks` (`Object`): Vue インスタンスにグローバルを追加します。
164165

165166
`options.localVue` (`Object`): `mount` で使う Vue クラスです。[createLocalVue](./createLocalVue.md)を参照してください。
167+
168+
169+
### `provide`
170+
171+
- 型: `Object`
172+
173+
コンポーネントに指定したプロパティを注入します。[provide/inject](https://vuejs.org/v2/api/#provide-inject) を参照してください。

docs/ja/api/wrapper-array/hasAttribute.md

Lines changed: 0 additions & 21 deletions
This file was deleted.

docs/ja/api/wrapper-array/hasClass.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

docs/ja/api/wrapper-array/hasProp.md

Lines changed: 0 additions & 24 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
`WrapperArray``Wrapper` ごとに `Wrapper` `vm` の computed プロパティを設定し、更新を強制します。
44

5-
**すべての Wrapper には Vue インスタンスを含む必要があることに注意してください**
5+
**すべての Wrapper には Vue インスタンスを含む必要があることに注意してください**
66
**`setComputed` に渡す computed プロパティはすべての Vue インスタンスに存在する必要があることに注意してください**
77

88
- **引数:**

docs/ja/api/wrapper/attributes.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# attributes()
2+
3+
`Wrapper` にラップされている要素の属性をオブジェクトで返します。
4+
5+
- **戻り値:** `{[attribute: string]: any}`
6+
7+
- **例:**
8+
9+
```js
10+
import { mount } from 'vue-test-utils'
11+
import { expect } from 'chai'
12+
import Foo from './Foo.vue'
13+
14+
const wrapper = mount(Foo)
15+
expect(wrapper.attributes().id).toBe('foo')
16+
```

0 commit comments

Comments
 (0)