Skip to content

Commit 45e5276

Browse files
committed
minor: following better practices
1 parent 71eddfd commit 45e5276

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

cypress/integration/counter-vuex-spec.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ describe('Vuex Counter', () => {
1919
const getCount = () =>
2020
Cypress.vue.$store.state.count
2121

22-
const setCount = value => {
23-
Cypress.vue.$store.state.count = value
24-
}
22+
const setCount = value =>
23+
Cypress.vue.$set(Cypress.vue.$store.state, 'count', value)
2524

2625
it('starts with zero', () => {
2726
cy.contains('0 times')
@@ -45,8 +44,8 @@ describe('Vuex Counter', () => {
4544
})
4645

4746
it('asynchronously increments counter', () => {
48-
let count = getCount()
47+
const count = getCount()
4948
cy.contains('button', 'Increment async').click()
50-
cy.contains(`${count++} times`)
49+
cy.contains(`${count + 1} times`)
5150
})
5251
})

0 commit comments

Comments
 (0)