Configuration Vitest in Nuxt 3

Good afternoon, everyone! How are you?

I have a large project made with Nuxt 3, Vue, Pinia, Axios, and TypeScript.

Can you help me fully configure Vitest in my project? I’ve had many problems. For example, I wrote a test and it didn’t recognize the c…


This content originally appeared on DEV Community and was authored by JJBit "Julio"

Good afternoon, everyone! How are you?

I have a large project made with Nuxt 3, Vue, Pinia, Axios, and TypeScript.

Can you help me fully configure Vitest in my project? I've had many problems. For example, I wrote a test and it didn't recognize the components folder with ~/ or @/ etc.

Now I have a problem: 'Error: Nuxt instance unavailable' when testing a function file with an (axios) API, and it gives this error.


This content originally appeared on DEV Community and was authored by JJBit "Julio"


Print Share Comment Cite Upload Translate Updates
APA

JJBit "Julio" | Sciencx (2024-06-24T19:25:03+00:00) Configuration Vitest in Nuxt 3. Retrieved from https://www.scien.cx/2024/06/24/configuration-vitest-in-nuxt-3/

MLA
" » Configuration Vitest in Nuxt 3." JJBit "Julio" | Sciencx - Monday June 24, 2024, https://www.scien.cx/2024/06/24/configuration-vitest-in-nuxt-3/
HARVARD
JJBit "Julio" | Sciencx Monday June 24, 2024 » Configuration Vitest in Nuxt 3., viewed ,<https://www.scien.cx/2024/06/24/configuration-vitest-in-nuxt-3/>
VANCOUVER
JJBit "Julio" | Sciencx - » Configuration Vitest in Nuxt 3. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2024/06/24/configuration-vitest-in-nuxt-3/
CHICAGO
" » Configuration Vitest in Nuxt 3." JJBit "Julio" | Sciencx - Accessed . https://www.scien.cx/2024/06/24/configuration-vitest-in-nuxt-3/
IEEE
" » Configuration Vitest in Nuxt 3." JJBit "Julio" | Sciencx [Online]. Available: https://www.scien.cx/2024/06/24/configuration-vitest-in-nuxt-3/. [Accessed: ]
rf:citation
» Configuration Vitest in Nuxt 3 | JJBit "Julio" | Sciencx | https://www.scien.cx/2024/06/24/configuration-vitest-in-nuxt-3/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.