Skip to content

fix: Include tests without .nuxt. extension #1311

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

lutejka
Copy link

@lutejka lutejka commented Jun 2, 2025

Include tests without .nuxt. extension, by creating a workspace for the default environment

πŸ”— Linked issue

Resolves #1296

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Moving environmentMatchGlobs to define a workspace for the nuxt environment resulted in Vitest only running tests within that specific nuxt workspace, excluding tests from the parent/default configuration (from which the workspace inherits). Creating an additional workspace for the default, non-Nuxt environment ensured all tests were included again.

@lutejka lutejka requested a review from danielroe as a code owner June 2, 2025 09:25
Copy link

pkg-pr-new bot commented Jun 2, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/test-utils@1311

commit: 19a4a3e

@lutejka lutejka force-pushed the include-test-without-nuxt-ext branch from 3eedc39 to 41f0759 Compare June 2, 2025 11:36
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks great! might it be possible to add a simple fixture to the examples/ directory so we avoid this regression happening again?

@lutejka lutejka force-pushed the include-test-without-nuxt-ext branch from a9addc8 to 0ef0a76 Compare June 12, 2025 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update from 3.18 to 3.19 changed default configuration, causing tests without .nuxt. to not be included
2 participants