Skip to content

fix(kit): include all tests in typechecking paths#35127

Draft
mohitkum4r wants to merge 1 commit into
nuxt:mainfrom
mohitkum4r:fix/test-typecheck-paths
Draft

fix(kit): include all tests in typechecking paths#35127
mohitkum4r wants to merge 1 commit into
nuxt:mainfrom
mohitkum4r:fix/test-typecheck-paths

Conversation

@mohitkum4r

@mohitkum4r mohitkum4r commented May 19, 2026

Copy link
Copy Markdown
Contributor

🔗 Related Issue

Closes #34756

Context

Currently, Nuxt only tracks test files nested under test/nuxt/ or tests/nuxt/ directories for application-wide TypeScript typechecking. Any test files placed directly under the root test/ or tests/ folders (such as tests/utils.test.ts) were excluded, which caused commands like nuxi typecheck to falsely succeed even when those test files contained TypeScript compilation errors.

Solution

  1. Modified the resolveLayerPaths helper in packages/kit/src/template.ts to track all files recursively under test/**/* and tests/**/* instead of only matching test/nuxt/**/* and tests/nuxt/**/*.
  2. Updated the inline snapshot expectations in packages/kit/test/generate-types.spec.ts.

@github-actions github-actions Bot added 5.x 🐛 bug Something isn't working as expected labels May 19, 2026
@pkg-pr-new

pkg-pr-new Bot commented May 19, 2026

Copy link
Copy Markdown

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@35127

@nuxt/nitro-server

npm i https://pkg.pr.new/@nuxt/nitro-server@35127

nuxt

npm i https://pkg.pr.new/nuxt@35127

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@35127

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@35127

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@35127

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@35127

commit: f2fc640

@mohitkum4r mohitkum4r force-pushed the fix/test-typecheck-paths branch from 754a777 to f2fc640 Compare May 19, 2026 20:50
@codspeed-hq

codspeed-hq Bot commented May 19, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 20 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing mohitkum4r:fix/test-typecheck-paths (f2fc640) with main (2124a89)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@danielroe

Copy link
Copy Markdown
Member

~> #34756 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x 🐛 bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tests not in a test[s]/nuxt/ subdirectory are excluded from typechecking

2 participants