Why does VueX store retain state across multiple unit tests? Why does VueX store retain state across multiple unit tests? vue.js vue.js

Why does VueX store retain state across multiple unit tests?


The solution was to use a function for the state in the module rather than a plain old javascript object. Here is my new store state code:

export const state = () => {  return {    currentPage: 0  }}

Answer was provided by @SumNeuron from the Vue discord channel.