Skip to content

fix(tests): hide Vue <Suspense> experimental warning in vitest output - #599

Merged
BenPinet merged 1 commit into
nextfrom
fix/suspense_warning
Nov 23, 2026
Merged

BenPinet merged 1 commit into
nextfrom
fix/suspense_warning

Conversation

@JulienChampagnol

Copy link
Copy Markdown
Member

Filters the Vue message <Suspense> is an experimental feature and its API will likely change. from the Vitest output with onConsoleLog, as suggested in nuxt/nuxt#25973 (reply in thread).

  • Integration tests: the message was printed 26 times, now 0.
  • Unit tests: unchanged (455 passed, never printed it).
  • Vease unit tests checked too: they never print it, so no change needed there.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JulienChampagnol
JulienChampagnol marked this pull request as ready for review November 23, 2026 11:46

@BotellaA BotellaA left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Lol no better way to disable it? 😇

@JulienChampagnol

Copy link
Copy Markdown
Member Author

Lol no better way to disable it? 😇

No, there isn't a better way, so I'd keep the PR as it is.

Nuxt has no setting for it. The testing page you linked doesn't mention this warning, and nothing in defineVitestProject, environmentOptions.nuxt or the mocks turns it off. The message comes from Vue itself, not from Nuxt or @nuxt/test-utils. Vue prints it once each time Vue is loaded, and Vitest loads a fresh copy for every test file, which is why we saw it 26 times: once per integration file.
Vue has no switch either. The message is only printed in Vue's development build, and Vue offers no option to silence it. The only way to remove it at the source would be to make tests use Vue's production build, which also removes the Vue warnings we do want in tests.

@BenPinet
BenPinet merged commit 38d803f into next Nov 23, 2026
36 checks passed
@BenPinet
BenPinet deleted the fix/suspense_warning branch November 23, 2026 13:59
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.

3 participants