vuejs / vue-jest

Jest Vue transformer
MIT License
748 stars 156 forks source link

Support Nuxt3 Auto-Imports #430

Open xxSkyy opened 2 years ago

xxSkyy commented 2 years ago

Nuxt 3 provides auto import for script-setup for composable functions (not only)

Info about: https://www.storyblok.com/mp/nuxt3-best-features

Example: https://codesandbox.io/s/dazzling-butterfly-7eo67

It'd be great to support it, for now it throws errors like ReferenceError: ref is not defined if you won't import it manually

lmiller1990 commented 2 years ago

Is this still an issue? It might be working since many fixes landed in @vue/vue3-jest.

xxSkyy commented 2 years ago

@lmiller1990 It is. with latest jest packages and @vue/vue3-jest I'm still receiving errors like ReferenceError: computed is not defined if it's not imported in component.

lmiller1990 commented 2 years ago

For #1 - does Nuxt auto import ref, computed etc? In the post it says

If you're familiar with Githubissues.

  • Githubissues is a development platform for aggregating issues.