Skip to content

Commit 6dcfc4f

Browse files
cpxPratikeddyerburgh
authored andcommitted
docs: update Vuex guide (#691)
1 parent 7e4350f commit 6dcfc4f

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

Diff for: docs/guides/using-with-vuex.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ And the test:
217217
import { shallowMount, createLocalVue } from '@vue/test-utils'
218218
import Vuex from 'vuex'
219219
import MyComponent from '../../../src/components/MyComponent'
220-
import mymodule from '../../../src/store/mymodule'
220+
import myModule from '../../../src/store/myModule'
221221

222222
const localVue = createLocalVue()
223223

@@ -230,9 +230,7 @@ describe('MyComponent.vue', () => {
230230

231231
beforeEach(() => {
232232
state = {
233-
module: {
234-
clicks: 2
235-
}
233+
clicks: 2
236234
}
237235

238236
actions = {
@@ -241,10 +239,10 @@ describe('MyComponent.vue', () => {
241239

242240
store = new Vuex.Store({
243241
modules: {
244-
mymodule: {
242+
myModule: {
245243
state,
246244
actions,
247-
getters: module.getters
245+
getters: myModule.getters
248246
}
249247
}
250248
})
@@ -257,7 +255,7 @@ describe('MyComponent.vue', () => {
257255
expect(actions.moduleActionClick).toHaveBeenCalled()
258256
})
259257

260-
it('Renders "state.inputValue" in first p tag', () => {
258+
it('renders "state.inputValue" in first p tag', () => {
261259
const wrapper = shallowMount(MyComponent, { store, localVue })
262260
const p = wrapper.find('p')
263261
expect(p.text()).toBe(state.clicks.toString())

0 commit comments

Comments
 (0)