Skip to content

nuxt/ui with vitest Package import specifier "#imports" is not defined #3814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
OrbisK opened this issue Apr 7, 2025 · 1 comment
Closed
Labels
question Further information is requested v3 #1289

Comments

@OrbisK
Copy link
Contributor

OrbisK commented Apr 7, 2025

Description

how to run vitest with nuxt/ui components?

example repo: https://github.com/OrbisK/nuxt-ui-vue-starter/tree/test/repoduction

  1. pnpm i
  2. pnpm test
  3. TypeError: Package import specifier "#imports" is not defined in package /var/www/html/node_modules/@nuxt/ui/package.json imported from /var/www/html/node_modules/@nuxt/ui/dist/runtime/plugins/colors.js
import App from './App.vue'
import {mount} from '@vue/test-utils'
import ui from '@nuxt/ui/vue-plugin'

it("should render button", ()=>{
    const wrapper = mount(App, {
        global: {
            plugins: [ui]
        }
    })
})
@OrbisK OrbisK added question Further information is requested v3 #1289 labels Apr 7, 2025
@OrbisK
Copy link
Contributor Author

OrbisK commented Apr 7, 2025

duplicate: #3213

@OrbisK OrbisK closed this as completed Apr 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested v3 #1289
Projects
None yet
Development

No branches or pull requests

1 participant