File tree 1 file changed +5
-7
lines changed
1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,7 @@ And the test:
217
217
import { shallowMount , createLocalVue } from ' @vue/test-utils'
218
218
import Vuex from ' vuex'
219
219
import MyComponent from ' ../../../src/components/MyComponent'
220
- import mymodule from ' ../../../src/store/mymodule '
220
+ import myModule from ' ../../../src/store/myModule '
221
221
222
222
const localVue = createLocalVue ()
223
223
@@ -230,9 +230,7 @@ describe('MyComponent.vue', () => {
230
230
231
231
beforeEach (() => {
232
232
state = {
233
- module: {
234
- clicks: 2
235
- }
233
+ clicks: 2
236
234
}
237
235
238
236
actions = {
@@ -241,10 +239,10 @@ describe('MyComponent.vue', () => {
241
239
242
240
store = new Vuex.Store ({
243
241
modules: {
244
- mymodule : {
242
+ myModule : {
245
243
state,
246
244
actions,
247
- getters: module .getters
245
+ getters: myModule .getters
248
246
}
249
247
}
250
248
})
@@ -257,7 +255,7 @@ describe('MyComponent.vue', () => {
257
255
expect (actions .moduleActionClick ).toHaveBeenCalled ()
258
256
})
259
257
260
- it (' Renders "state.inputValue" in first p tag' , () => {
258
+ it (' renders "state.inputValue" in first p tag' , () => {
261
259
const wrapper = shallowMount (MyComponent, { store, localVue })
262
260
const p = wrapper .find (' p' )
263
261
expect (p .text ()).toBe (state .clicks .toString ())
You can’t perform that action at this time.
0 commit comments