How can i write test cases for this Feedback form using Vitest & vue/test-utils ? #9022
-
For this Feedback form component, I'm using the NUXT UI module.
interface Feedback { const submitForm = async () => { This is vitest code for testing this form componentimport { describe, it, expect } from 'vitest'; import Feedback from '../../pages/site/feedback.vue'; describe('Feedback Form is Testing', () => {
}); I have been attempting to resolve this issue by seeking assistance from both Google and a Discord server { Nuxt, Vue Land, Vitest Dev, }. Despite my efforts, I have not yet found a solution. I kindly request your help in addressing this matter.Thank You ⭐ |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
It seems like the auto-imports are not being registered properly. You may want to use the Vitest library for Nuxt. |
Beta Was this translation helpful? Give feedback.
you are right it is a autoimport issue in nuxt
i have solved this problem
here is the readme doc where i shared how i solved this auto-imports issue without using nuxt-vitest
Readme: https://github.com/anayatkhan1/Unit_testing_in_nuxt