Category "vitest"

Vue3- Using Vitest toHaveBeenCalled() method

I am running a vue3 application using the Composition API and the setup() hook. I am using Vitest as unit-test framework. (v 0.6.1) I have the following sample

Vue Pinia function is undefined in onMounted when unit test is ran

I have a component and a Pinia store which contains a state and some actions. The code works perfectly fine in browser and in E2E (cypress) tests, but fail on u

Testing with vitest and testing-library is not working: it is due to using the SFC Script Setup?

I'm new to Vue and especially with the composition functions. I'm trying to test a component that uses the script setup; however, it seems that it is not workin