[Vuejs]-Vuex Store keeps state somehow between tests

0๐Ÿ‘

โœ…

I solved the problem. When storing the response from the backend I replaced the array in the vuex.state with the new array, thereby breaking reactivity.
When I use

state.appointments.splice(0,Infinity, ...newAppointments)

all the elements of the original array are replaced with the new elements. Reactivity is preserved and the tests passes

Leave a comment