vueform / vueform

Open-Source Form Framework for Vue
https://vueform.com
MIT License
935 stars 61 forks source link

Testing with Vitest in Nuxt #295

Open adamberecz opened 1 month ago

adamberecz commented 1 month ago

Environment

-

Reproduction

-

Describe the bug

Vueform components are not mounted with Nuxt & Vitest: https://discord.com/channels/787237947635793940/1256016710008311909

Additional context

No response

Logs

No response

LarsDD-gh commented 1 month ago

@adamberecz if it helps: you can reference https://stackblitz.com/edit/nuxt-starter-p2wxd6 for reproduction.

Also, maybe maintining a valid, small sample-project in github could be helpful in the future. i.e. have a showcase-project to demo the testing-approach. I invited you to my demo-project - just in case this is helpful.

thely commented 5 days ago

Just chiming in that I'm having the same problem as described in the Discord thread, but without Nuxt (using Vue 3, Vitest, and @vue/test-utils). If it helps, I get the following Vue warnings:

[Vue warn]: Failed to resolve component: GroupElement
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. 
  at <SchemaTest ref="VTU_COMPONENT" > 
  at <VTUROOT>
[Vue warn]: Failed to resolve component: Vueform
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement. 
  at <SchemaTest ref="VTU_COMPONENT" > 
  at <VTUROOT>