Skip to content

Conversation

@JessicaSachs
Copy link
Contributor

@JessicaSachs JessicaSachs commented May 5, 2025

πŸ”— Linked issue

#1283

TODO

❓ 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

The Nuxt Content module relies on useRuntimeConfig in order to render any of its built-in ProseH1, ProseH2, or ProseH3 components. Currently, components that call useRuntimeConfig within setup throw an error that the Nuxt instance is not available.

This only happens in browser mode.

Running the Tests

To execute the tests, you can run:

pnpm --filter example-app-vitest-content -r test:browser

I've marked the failing tests as "skipped"

@pkg-pr-new
Copy link

pkg-pr-new bot commented May 5, 2025

Open in StackBlitz

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

commit: b86b09c

@JessicaSachs JessicaSachs force-pushed the jess/vitest-nuxt-content branch from 480ca9d to 2c41fd6 Compare May 5, 2025 19:08
@danielroe danielroe changed the title feat: support Nuxt Content in Browser mode test: add browser mode tests for nuxt/content components May 15, 2025
@danielroe danielroe marked this pull request as ready for review May 15, 2025 14:45
@danielroe danielroe self-requested a review as a code owner May 15, 2025 14:45
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.

thank you! ❀️

@danielroe danielroe merged commit 5e5431f into nuxt:main May 15, 2025
6 checks passed
@github-actions github-actions bot mentioned this pull request May 15, 2025
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.

2 participants