Skip to content

test: patch test-utils and force dev mode#248

Merged
huang-julien merged 3 commits intomainfrom
fix/tests
Feb 27, 2026
Merged

test: patch test-utils and force dev mode#248
huang-julien merged 3 commits intomainfrom
fix/tests

Conversation

@huang-julien
Copy link
Member

🔗 Linked issue

📚 Description

TODO: investigate why we need to disable app-manifest

@huang-julien huang-julien changed the title test: patch test-utils test: patch test-utils and force dev mode Feb 27, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/hints/@nuxt/hints@248

commit: bc20d10

@coderabbitai
Copy link

coderabbitai bot commented Feb 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7bd9e84 and bc20d10.

📒 Files selected for processing (2)
  • test/fixtures/basic/nuxt.config.ts
  • vitest.runtime.config.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • test/fixtures/basic/nuxt.config.ts

📝 Walkthrough

Walkthrough

This pull request adds a patch for @nuxt/test-utils that makes the dev flag passed to loadNuxt use options.overrides?.dev ?? false instead of a hardcoded false. It registers that patch in pnpm-workspace.yaml, adds overrides.dev: true to the Nuxt test environment in vitest.runtime.config.ts, updates the hydration plugin to exclude dist/ from transformations, and disables experimental.appManifest in a test fixture Nuxt config.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: patching @nuxt/test-utils and introducing dev mode override in the test configuration.
Description check ✅ Passed The description is minimal but related to the changeset, mentioning the need to disable app-manifest and aligning with the patch and dev mode modifications in the files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
test/fixtures/basic/nuxt.config.ts (1)

7-9: Consider adding a comment explaining why appManifest is disabled.

The PR description mentions a TODO to investigate why disabling the app-manifest is necessary. Adding a brief comment here would help future maintainers understand this workaround.

Suggested comment
   experimental: {
+    // TODO: Investigate why appManifest must be disabled for tests (see PR `#248`)
     appManifest: false,
   },
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@test/fixtures/basic/nuxt.config.ts` around lines 7 - 9, Add an inline comment
above the experimental.appManifest setting explaining why appManifest is
disabled (e.g., reference the observed build/runtime issue, link or TODO ID, and
any repro steps or ticket number), so future maintainers know this is an
intentional workaround; update the block containing experimental and appManifest
to include that concise explanatory comment and retain the existing TODO about
investigating the root cause.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@test/fixtures/basic/nuxt.config.ts`:
- Around line 7-9: The linter is failing because the experimental object literal
in nuxt.config.ts is missing a trailing comma; update the experimental block
(the object with property appManifest: false) so the closing brace has a
trailing comma (i.e., change "experimental: { appManifest: false }" to
"experimental: { appManifest: false, },") to satisfy the comma rule.

In `@vitest.runtime.config.ts`:
- Around line 14-16: Add the missing trailing comma after the overrides object
so the surrounding object literal is properly terminated; locate the overrides
property (overrides: { dev: true }) in vitest.runtime.config.ts and append a
trailing comma after its closing brace to satisfy the linter.

---

Nitpick comments:
In `@test/fixtures/basic/nuxt.config.ts`:
- Around line 7-9: Add an inline comment above the experimental.appManifest
setting explaining why appManifest is disabled (e.g., reference the observed
build/runtime issue, link or TODO ID, and any repro steps or ticket number), so
future maintainers know this is an intentional workaround; update the block
containing experimental and appManifest to include that concise explanatory
comment and retain the existing TODO about investigating the root cause.

ℹ️ Review info

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bbfb1ea and 7bd9e84.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • patches/@nuxt__test-utils.patch
  • pnpm-workspace.yaml
  • src/plugins/hydration.ts
  • test/fixtures/basic/nuxt.config.ts
  • vitest.runtime.config.ts

@huang-julien huang-julien merged commit 1202515 into main Feb 27, 2026
7 checks passed
@huang-julien huang-julien deleted the fix/tests branch February 27, 2026 11:32
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.

1 participant