App.vue doesnt mount when running tests
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 437
- Forks
- 120
- Avg merge
- 22h 52m
- Merged PRs (30d)
- 23
Description
Environment
[8:43:08 AM] Working directory: C:/code/nuxt-test
[8:43:08 AM] Nuxt project info:
- Operating System: Windows_NT
- Node Version: v20.11.0
- Nuxt Version: 3.9.3
- CLI Version: 3.10.0
- Nitro Version: 2.8.1
- Package Manager: npm@10.2.4
- Builder: -
- User Config: devtools, modules
- Runtime Modules: @nuxt/test-utils/module@3.11.0
- Build Modules: -
Reproduction
https://github.com/joel-wenzel/nuxt-test
Steps to reproduce:
- git clone https://github.com/joel-wenzel/nuxt-test
- cd nuxt-test
- npm ci
- npm run test
- There are two console logs in app.vue that dont seem to be logged
Describe the bug
It seems like App.vue doesnt mount when using @nuxt/test-utils. This was something nuxt-vitest did do, at least version 0.11.0.
In my case I am also using vuetify and rely on some of the vuetify elements being mounted in the app which unfortunately is not happening.
Additional context
No response
Logs
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Clone the linked nuxt-test reproduction, install dependencies with npm ci, and run npm run test. Start with app.vue and the @nuxt/test-utils setup to trace why its console logs and Vuetify elements are not mounted. Done means App.vue mounts during tests and the reproduction logs appear as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- nuxtjs, typescript
- Domain
- frontend, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100