@@ -67,23 +67,23 @@ describe('Actions.vue', () => {
67
67
})
68
68
})
69
69
70
- it (' 当事件的值是“input”时会 dispatch“ actionInput” ' , () => {
70
+ it (' dispatches " actionInput" when input event value is "input" ' , () => {
71
71
const wrapper = shallowMount (Actions, { store, localVue })
72
72
const input = wrapper .find (' input' )
73
73
input .element .value = ' input'
74
74
input .trigger (' input' )
75
75
expect (actions .actionInput ).toHaveBeenCalled ()
76
76
})
77
77
78
- it (' 当事件的值不是“input”时不会 dispatch “ actionInput” ' , () => {
78
+ it (' does not dispatch " actionInput" when event value is not "input" ' , () => {
79
79
const wrapper = shallowMount (Actions, { store, localVue })
80
80
const input = wrapper .find (' input' )
81
81
input .element .value = ' not input'
82
82
input .trigger (' input' )
83
83
expect (actions .actionInput ).not .toHaveBeenCalled ()
84
84
})
85
85
86
- it (' 当按钮被点击时候调用“actionClick”的 action' , () => {
86
+ it (' calls store action "actionClick" when button is clicked ' , () => {
87
87
const wrapper = shallowMount (Actions, { store, localVue })
88
88
wrapper .find (' button' ).trigger (' click' )
89
89
expect (actions .actionClick ).toHaveBeenCalled ()
@@ -154,13 +154,13 @@ describe('Getters.vue', () => {
154
154
})
155
155
})
156
156
157
- it (' 在第一个 p 标签中渲染“ store.state .inputValue” ' , () => {
157
+ it (' Renders " store.getters .inputValue" in first p tag ' , () => {
158
158
const wrapper = shallowMount (Getters, { store, localVue })
159
159
const p = wrapper .find (' p' )
160
160
expect (p .text ()).toBe (getters .inputValue ())
161
161
})
162
162
163
- it (' 在第二个 p 标签中渲染“ store.state .clicks” ' , () => {
163
+ it (' Renders " store.getters .clicks" in second p tag ' , () => {
164
164
const wrapper = shallowMount (Getters, { store, localVue })
165
165
const p = wrapper .findAll (' p' ).at (1 )
166
166
expect (p .text ()).toBe (getters .clicks ().toString ())
@@ -238,14 +238,14 @@ describe('MyComponent.vue', () => {
238
238
})
239
239
})
240
240
241
- it (' 在点击按钮时调用 action“ moduleActionClick” ' , () => {
241
+ it (' calls store action " moduleActionClick" when button is clicked ' , () => {
242
242
const wrapper = shallowMount (MyComponent, { store, localVue })
243
243
const button = wrapper .find (' button' )
244
244
button .trigger (' click' )
245
245
expect (actions .moduleActionClick ).toHaveBeenCalled ()
246
246
})
247
247
248
- it (' 在第一个 p 标签内渲染“ state.clicks' , () => {
248
+ it (' renders " state.clicks" in first p tag ' , () => {
249
249
const wrapper = shallowMount (MyComponent, { store, localVue })
250
250
const p = wrapper .find (' p' )
251
251
expect (p .text ()).toBe (state .clicks .toString ())
0 commit comments