Skip to content

Commit

Permalink
minor: following better practices
Browse files Browse the repository at this point in the history
  • Loading branch information
amirrustam committed Jan 27, 2018
1 parent 71eddfd commit 45e5276
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions cypress/integration/counter-vuex-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ describe('Vuex Counter', () => {
const getCount = () =>
Cypress.vue.$store.state.count

const setCount = value => {
Cypress.vue.$store.state.count = value
}
const setCount = value =>
Cypress.vue.$set(Cypress.vue.$store.state, 'count', value)

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

it('asynchronously increments counter', () => {
let count = getCount()
const count = getCount()
cy.contains('button', 'Increment async').click()
cy.contains(`${count++} times`)
cy.contains(`${count + 1} times`)
})
})

0 comments on commit 45e5276

Please sign in to comment.