Skip to content

Translation for Japanese #95

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 70 commits into from
Oct 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
758fe1a
setup japanese translation
sunecosuri Sep 30, 2017
2f80a9d
translate README.md
sunecosuri Sep 30, 2017
1f96747
translate SUMMARY.md
sunecosuri Sep 30, 2017
8ac951c
translate getting-started.md
sunecosuri Sep 30, 2017
da44ca6
translate common-gotchas.md
sunecosuri Sep 30, 2017
91cbc3b
update getting-started.md
sunecosuri Sep 30, 2017
7add2ad
translate /api/wrapper/README.md
sunecosuri Sep 30, 2017
22158e6
update /api/wrapper/README.md
sunecosuri Sep 30, 2017
0580829
translate /api/README.md
sunecosuri Sep 30, 2017
5f7731a
translate /api/wrapper/contains.md
sunecosuri Sep 30, 2017
de84423
translate /api/wrapper/exist.md
sunecosuri Sep 30, 2017
b58fa22
translate /api/wrapper/find.md
sunecosuri Sep 30, 2017
f97f164
translate /api/wrapper/findAll.md
sunecosuri Sep 30, 2017
aa44330
translate /api/wrapper/hasAttribute.md
sunecosuri Sep 30, 2017
b49efd2
translate /api/wrapper/hasClass.md
sunecosuri Sep 30, 2017
f53c65d
translate /api/wrapper/hasProp.md
sunecosuri Sep 30, 2017
c3ea516
translate /api/wrapper/hasStyle.md
sunecosuri Sep 30, 2017
4fcdf86
update /api/wrapper/hasProp.md
sunecosuri Sep 30, 2017
4df04f0
translate /api/wrapper/html.md
sunecosuri Sep 30, 2017
94c32c3
translate /api/wrapper/is.md:
sunecosuri Sep 30, 2017
bf58996
translate api/wrapper/isEmpty.md
sunecosuri Sep 30, 2017
d85003f
translate /api/wrapper/isVueInstance.md
sunecosuri Sep 30, 2017
e89dcbe
translate /api/wrapper/setData.md
sunecosuri Sep 30, 2017
8abe209
translate /api/wrapper/setData.md
sunecosuri Sep 30, 2017
3255e9d
translate /api/wrapper/setMethods.md
sunecosuri Sep 30, 2017
44b99c0
translate /api/wrapper/setProps.md
sunecosuri Sep 30, 2017
86142ca
translate /api/wrapper/text.md
sunecosuri Sep 30, 2017
6b52578
translate /api/wrapper/trigger.md
sunecosuri Sep 30, 2017
c08e849
translate /api/wrapper/update.md
sunecosuri Sep 30, 2017
ab6a276
update common-gotchas.md
sunecosuri Oct 1, 2017
eabdd66
translate /api/createLocalVue.md
sunecosuri Oct 1, 2017
629b2b7
translate /api/mount.md
sunecosuri Oct 1, 2017
74beb46
improve japanese
Oct 2, 2017
8d30c66
translate /api/selectors.md
Oct 2, 2017
e2545d9
improve japanese
Oct 2, 2017
ca7db35
translate /api/wrapper-array/shallow.md
Oct 2, 2017
a1e8cae
translate /api/wrapper-array/README.md
Oct 2, 2017
126506b
translate api/wrapper-array/at.md
Oct 2, 2017
db15431
translate /api/wrapper-array/contains.md
Oct 2, 2017
2d772fc
translate /api/wrapper-array
Oct 2, 2017
50052e1
Merge branch 'dev' of github.com:vuejs/vue-test-utils into translate-ja
sunecosuri Oct 5, 2017
92e7e90
translate api/options.md
sunecosuri Oct 5, 2017
b88e003
improve README.md
sunecosuri Oct 5, 2017
2d999e8
improves api/options.md mount.md README.md
sunecosuri Oct 5, 2017
453e170
Merge branch 'translate-ja' of ssh://github.com/sunecosuri/vue-test-u…
sunecosuri Oct 7, 2017
7013e6b
improve ja docs
sunecosuri Oct 8, 2017
de4003e
translate docs/guides/
sunecosuri Oct 8, 2017
a881e50
improved to contents of feedback
sunecosuri Oct 8, 2017
c5b9360
`using-with-vuex` is does not translate to wait for updates
sunecosuri Oct 9, 2017
9b1b2b7
tweak translation
kazupon Oct 10, 2017
458d2e8
add vuex section
kazupon Oct 10, 2017
997692a
add ja
kazupon Oct 10, 2017
fa8bf8c
Merge branch 'upstream/dev' into translate-ja
kazupon Oct 12, 2017
a6df1f4
Merge branch 'upstream/dev' into translate-ja
kazupon Oct 13, 2017
d31f10e
pick up from en getting-started.md
kazupon Oct 13, 2017
9236573
sync 1.0.0 beta-2 docs
kazupon Oct 13, 2017
e70d12a
Merge branch 'upstream/dev' into translate-ja
kazupon Oct 13, 2017
12693cb
docs: add TOC vue-router
kazupon Oct 13, 2017
3984871
translate vue-router using section
kazupon Oct 13, 2017
7bcfae1
translate vuex using section
kazupon Oct 13, 2017
e0cf294
docs: translate note at getting started section
kazupon Oct 13, 2017
3ea1479
docs: tweak translation
kazupon Oct 13, 2017
048f059
Merge branch 'upstream/dev' into translate-ja
kazupon Oct 13, 2017
94f44b3
docs: pick up from #94
kazupon Oct 13, 2017
2b5a1fe
docs: fix links
kazupon Oct 13, 2017
6a5d011
docs: fix typo in test descriptions
kazupon Oct 13, 2017
2907de9
Merge branch 'upstream/dev' into translate-ja
kazupon Oct 15, 2017
5343316
docs: fix review comments
kazupon Oct 16, 2017
f7732e8
docs: pick up from https://github.com/vuejs/vue-test-utils/commit/020…
kazupon Oct 18, 2017
39d1bf8
docs: update mounting component translation
kazupon Oct 18, 2017
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
1 change: 1 addition & 0 deletions docs/LANGS.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
* [English](en/)
* [日本語](ja/)
49 changes: 49 additions & 0 deletions docs/ja/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# vue-test-utils

`vue-test-utils`は Vue.js 向けの公式単体テストライブラリです。

* [ガイド](guides/README.md)
* [はじめる](guides/getting-started.md)
* [一般的なヒント](guides/common-tips.md)
* [テストランナを選ぶ](guides/choosing-a-test-runner.md)
* [Jest による単一ファイルコンポーネントのテスト](guides/testing-SFCs-with-jest.md)
* [Mocha + webpack による単一ファイルコンポーネントのテスト](guides/testing-SFCs-with-mocha-webpack.md)
* [Vue Router と一緒に使う](guides/using-with-vue-router.md)
* [Vuex と一緒に使う](guides/using-with-vuex.md)
* [API](api/README.md)
* [createLocalVue](api/createLocalVue.md)
* [mount](api/mount.md)
* [shallow](api/shallow.md)
* [マウンティングオプション](api/options.md)
* [Wrapper](api/wrapper/README.md)
* [contains](api/wrapper/contains.md)
* [find](api/wrapper/find.md)
* [hasAttribute](api/wrapper/hasAttribute.md)
* [hasClass](api/wrapper/hasClass.md)
* [hasProp](api/wrapper/hasProp.md)
* [hasStyle](api/wrapper/hasStyle.md)
* [html](api/wrapper/html.md)
* [is](api/wrapper/is.md)
* [isEmpty](api/wrapper/isEmpty.md)
* [isVueInstance](api/wrapper/isVueInstance.md)
* [name](api/wrapper/name.md)
* [update](api/wrapper/update.md)
* [setData](api/wrapper/setData.md)
* [setProps](api/wrapper/setProps.md)
* [text](api/wrapper/text.md)
* [trigger](api/wrapper/trigger.md)
* [WrapperArray](api/wrapper-array/README.md)
* [at](api/wrapper-array/at.md)
* [contains](api/wrapper-array/contains.md)
* [hasAttribute](api/wrapper-array/hasAttribute.md)
* [hasClass](api/wrapper-array/hasClass.md)
* [hasProp](api/wrapper-array/hasProp.md)
* [hasStyle](api/wrapper-array/hasStyle.md)
* [is](api/wrapper-array/is.md)
* [isEmpty](api/wrapper-array/isEmpty.md)
* [isVueInstance](api/wrapper-array/isVueInstance.md)
* [update](api/wrapper-array/update.md)
* [setData](api/wrapper-array/setData.md)
* [setProps](api/wrapper-array/setProps.md)
* [trigger](api/wrapper-array/trigger.md)
* [セレクタ](api/selectors.md)
61 changes: 61 additions & 0 deletions docs/ja/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## 目次

* [ガイド](guides/README.md)
* [はじめる](guides/getting-started.md)
* [一般的なヒント](guides/common-tips.md)
* [テストランナを選ぶ](guides/choosing-a-test-runner.md)
* [Jest による単一ファイルコンポーネントのテスト](guides/testing-SFCs-with-jest.md)
* [Mocha + webpack による単一ファイルコンポーネントのテスト](guides/testing-SFCs-with-mocha-webpack.md)
* [Vue Router と一緒に使う](guides/using-with-vue-router.md)
* [Vuex と一緒に使う](guides/using-with-vuex.md)
* [API](api/README.md)
* [mount](api/mount.md)
* [shallow](api/shallow.md)
* [マウンティングオプション](api/options.md)
- [context](api/options.md#context)
- [slots](api/options.md#slots)
- [stubs](api/options.md#stubs)
- [mocks](api/options.md#mocks)
- [localVue](api/options.md#localvue)
- [attachToDocument](api/options.md#attachtodocument)
- [attrs](api/options.md#attrs)
- [listeners](api/options.md#listeners)
- [clone](api/options.md#clone)
* [Wrapper](api/wrapper/README.md)
* [contains](api/wrapper/contains.md)
* [emitted](api/wrapper/emitted.md)
* [emittedByOrder](api/wrapper/emittedByOrder.md)
* [find](api/wrapper/find.md)
* [findAll](api/wrapper/findAll.md)
* [hasAttribute](api/wrapper/hasAttribute.md)
* [hasClass](api/wrapper/hasClass.md)
* [hasProp](api/wrapper/hasProp.md)
* [hasStyle](api/wrapper/hasStyle.md)
* [html](api/wrapper/html.md)
* [is](api/wrapper/is.md)
* [isEmpty](api/wrapper/isEmpty.md)
* [isVueInstance](api/wrapper/isVueInstance.md)
* [name](api/wrapper/name.md)
* [setData](api/wrapper/setData.md)
* [setMethods](api/wrapper/setMethods.md)
* [setProps](api/wrapper/setProps.md)
* [text](api/wrapper/text.md)
* [trigger](api/wrapper/trigger.md)
* [update](api/wrapper/update.md)
* [WrapperArray](api/wrapper-array/README.md)
* [at](api/wrapper-array/at.md)
* [contains](api/wrapper-array/contains.md)
* [hasAttribute](api/wrapper-array/hasAttribute.md)
* [hasClass](api/wrapper-array/hasClass.md)
* [hasProp](api/wrapper-array/hasProp.md)
* [hasStyle](api/wrapper-array/hasStyle.md)
* [is](api/wrapper-array/is.md)
* [isEmpty](api/wrapper-array/isEmpty.md)
* [isVueInstance](api/wrapper-array/isVueInstance.md)
* [setData](api/wrapper-array/setData.md)
* [setMethods](api/wrapper-array/setMethods.md)
* [setProps](api/wrapper-array/setProps.md)
* [trigger](api/wrapper-array/trigger.md)
* [update](api/wrapper-array/update.md)
* [セレクタ](api/selectors.md)
* [createLocalVue](api/createLocalVue.md)
49 changes: 49 additions & 0 deletions docs/ja/api/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# API

* [mount](./mount.md)
* [shallow](./shallow.md)
* [Mounting Options](./options.md)
- [context](./options.md#context)
- [slots](./options.md#slots)
- [stubs](./options.md#stubs)
- [mocks](./options.md#mocks)
- [localVue](./options.md#localvue)
- [attachToDocument](./options.md#attachtodocument)
- [attrs](./options.md#attrs)
- [listeners](./options.md#listeners)
- [clone](./options.md#clone)
* [Wrapper](./wrapper/README.md)
* [contains](./wrapper/contains.md)
* [emitted](./wrapper/emitted.md)
* [emittedByOrder](./wrapper/emittedByOrder.md)
* [find](./wrapper/find.md)
* [hasAttribute](./wrapper/hasAttribute.md)
* [hasClass](./wrapper/hasClass.md)
* [hasProp](./wrapper/hasProp.md)
* [hasStyle](./wrapper/hasStyle.md)
* [html](./wrapper/html.md)
* [is](./wrapper/is.md)
* [isEmpty](./wrapper/isEmpty.md)
* [isVueInstance](./wrapper/isVueInstance.md)
* [name](./wrapper/name.md)
* [update](./wrapper/update.md)
* [setData](./wrapper/setData.md)
* [setProps](./wrapper/setProps.md)
* [text](./wrapper/text.md)
* [trigger](./wrapper/trigger.md)
* [WrapperArray](./wrapper-array/README.md)
* [at](./wrapper-array/at.md)
* [contains](./wrapper-array/contains.md)
* [hasAttribute](./wrapper-array/hasAttribute.md)
* [hasClass](./wrapper-array/hasClass.md)
* [hasProp](./wrapper-array/hasProp.md)
* [hasStyle](./wrapper-array/hasStyle.md)
* [is](./wrapper-array/is.md)
* [isEmpty](./wrapper-array/isEmpty.md)
* [isVueInstance](./wrapper-array/isVueInstance.md)
* [update](./wrapper-array/update.md)
* [setData](./wrapper-array/setData.md)
* [setProps](./wrapper-array/setProps.md)
* [trigger](./wrapper-array/trigger.md)
* [createLocalVue](./createLocalVue.md)
* [Selectors](./selectors.md)
28 changes: 28 additions & 0 deletions docs/ja/api/createLocalVue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# createLocalVue()

- **戻り値:**
- `{Component}`

- **使い方:**

`createLocalVue` は、グローバル Vue クラスを汚染することなくコンポーネント、ミックスイン、プラグインを追加するための Vue クラスを返します。

`options.localVue` と一緒に使用してください。

```js
import { createLocalVue, shallow } from 'vue-test-utils'
import { expect } from 'chai'
import Foo from './Foo.vue'

const localVue = createLocalVue()
const wrapper = shallow(Foo, {
localVue,
intercept: { foo: true }
})
expect(wrapper.vm.foo).toBe(true)

const freshWrapper = shallow(Foo)
expect(freshWrapper.vm.foo).toBe(false)
```

- **参照:** [一般的なヒント](../guides/common-tips.md#グローバルプラグインとミックスインの適用)
136 changes: 136 additions & 0 deletions docs/ja/api/mount.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# mount(component {, options}])

- **引数:**

- `{Component} component`
- `{Object} options`

- **戻り値:** `{Wrapper}`

- **オプション:**

[オプション](./options.md)を参照してください。

- **使い方:**

最初の DOM ノードまたは Vue コンポーネント一致セレクタの [`Wrapper`](./wrapper/README.md) を返します。

有効な[セレクタ](./selectors.md)を使用してください。

**オプションなし:**

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

describe('Foo', () => {
it('renders a div', () => {
const wrapper = mount(Foo)
expect(wrapper.contains('div')).toBe(true)
})
})
```
**Vueオプションを使用:**

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

describe('Foo', () => {
it('renders a div', () => {
const wrapper = mount(Foo, {
propsData: {
color: 'red'
}
})
expect(wrapper.hasProp('color', 'red')).toBe(true)
})
})
```

**DOMへのアタッチ:**

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

describe('Foo', () => {
it('renders a div', () => {
const wrapper = mount(Foo, {
attachToDocument: true
})
expect(wrapper.contains('div')).toBe(true)
})
})
```
**デフォルトおよび名前付きスロット:**

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

describe('Foo', () => {
it('renders a div', () => {
const wrapper = mount(Foo, {
slots: {
default: [Bar, FooBar],
fooBar: FooBar, // <slot name="FooBar" /> と一致する,
foo: '<div />'
}
})
expect(wrapper.contains('div')).toBe(true)
})
})
```

**グローバルプロパティのスタブ:**

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

describe('Foo', () => {
it('renders a div', () => {
const $route = { path: 'http://www.example-path.com' }
const wrapper = mount(Foo, {
intercept: {
$route
}
})
expect(wrapper.vm.$route.path).toBe($route.path)
})
})
```

**コンポーネントのスタブ:**

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

describe('Foo', () => {
it('renders a div', () => {
const wrapper = mount(Foo, {
stub: {
Bar: '<div class="stubbed />',
BarFoo: true,
FooBar: Faz
}
})
expect(wrapper.contains('.stubbed')).toBe(true)
expect(wrapper.contains(Bar)).toBe(true)
})
})
```

- **参照:** [`Wrapper`](./wrapper/README.md)
Loading