Switching from Vuex to Pinia, the author encountered issues using the setup stores syntax, particularly with unit testing. While the logger worked, the spy function failed, uncovering the complexity and different internal structure of setup stores. Workarounds are necessary to align tests, and using `store.$onAction` for side effects adds further complications.
Table of contents
You are using Pinia wrong!Setup StoresThe ProblemA disgusting workaroundFinal ThoughtsSort: