From 29a85cf6f405a4a242e05c76c0c478be3ccb5404 Mon Sep 17 00:00:00 2001 From: Jinjiang Date: Fri, 11 Jan 2019 15:32:33 +0800 Subject: [PATCH] docs(zh): updated --- docs/zh/api/wrapper-array/filter.md | 2 +- docs/zh/guides/dom-events.md | 2 +- docs/zh/guides/using-with-vuex.md | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/zh/api/wrapper-array/filter.md b/docs/zh/api/wrapper-array/filter.md index c0c0b6503..2857b7088 100644 --- a/docs/zh/api/wrapper-array/filter.md +++ b/docs/zh/api/wrapper-array/filter.md @@ -19,5 +19,5 @@ import Foo from './Foo.vue' const wrapper = shallowMount(Foo) const filteredDivArray = wrapper.findAll('div') - .filter(w => !w.classes('filtered')) + .filter(w => !w.hasClass('filtered')) ``` diff --git a/docs/zh/guides/dom-events.md b/docs/zh/guides/dom-events.md index f95833b20..967439cfe 100644 --- a/docs/zh/guides/dom-events.md +++ b/docs/zh/guides/dom-events.md @@ -158,7 +158,7 @@ describe('键盘事件测试', () => { expect(wrapper.vm.quantity).toBe(0) }) - it('上按键将数量设置为 1', () => { + it('上按键将数量加 1', () => { const wrapper = mount(QuantityComponent) wrapper.trigger('keydown.up') expect(wrapper.vm.quantity).toBe(1) diff --git a/docs/zh/guides/using-with-vuex.md b/docs/zh/guides/using-with-vuex.md index eaab6a49e..1ae1ed07b 100644 --- a/docs/zh/guides/using-with-vuex.md +++ b/docs/zh/guides/using-with-vuex.md @@ -276,7 +276,6 @@ export default { state.count++ } } - ``` ```js @@ -344,7 +343,8 @@ test('evenOrOdd returns odd if state.count is odd', () => { 我们来写一个测试吧。当我们创建一个 store 时,我们会使用 `localVue` 来避免污染 Vue 的基础构造函数。该测试会使用 `store-config.js` 导出的配置创建一个 store: ```js -// store-config.spec.js +// store-config.js + import mutations from './mutations' import getters from './getters' @@ -358,6 +358,8 @@ export default { ``` ```js +// store-config.spec.js + import { createLocalVue } from '@vue/test-utils' import Vuex from 'vuex' import storeConfig from './store-config'