From 45e5276b958255d10fa89ae15fb8e5947ac8cdb4 Mon Sep 17 00:00:00 2001 From: Amir Rustamzadeh Date: Sat, 27 Jan 2018 08:37:10 -0800 Subject: [PATCH] minor: following better practices --- cypress/integration/counter-vuex-spec.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cypress/integration/counter-vuex-spec.js b/cypress/integration/counter-vuex-spec.js index 7be15d7..51228e4 100644 --- a/cypress/integration/counter-vuex-spec.js +++ b/cypress/integration/counter-vuex-spec.js @@ -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') @@ -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`) }) })