Skip to content

Docs: Fix incorrect vitest.setup.ts snippet#31838

Merged
jonniebigodes merged 2 commits into
nextfrom
fix-vitest-setup-docs
Jul 14, 2025
Merged

Docs: Fix incorrect vitest.setup.ts snippet#31838
jonniebigodes merged 2 commits into
nextfrom
fix-vitest-setup-docs

Conversation

@kylegach
Copy link
Copy Markdown
Contributor

@kylegach kylegach commented Jun 20, 2025

What I did

Fix incorrect inclusion of vitest.beforeAll call in example vitest.setup.ts file for the Vitest addon docs

Checklist for Contributors

Testing

Manual testing

  1. Sync this branch with locally running docs

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

Greptile Summary

Updates Vitest addon documentation by removing incorrect beforeAll hook from the setup example. This change improves accuracy and clarity of the vitest.setup.ts configuration file.

  • Removes unnecessary vitest.beforeAll import and call from docs/_snippets/addon-vitest-set-project-annotations-simple.md
  • Renames snippet file path from portable-stories-vitest-set-project-annotations-simple.md to addon-vitest-set-project-annotations-simple.md
  • Updates docs/writing-tests/integrations/vitest-addon.mdx to reference the correctly named snippet file
  • Simplifies setup examples across React, Svelte, and Vue frameworks to only include essential project annotation code

@kylegach kylegach self-assigned this Jun 20, 2025
@kylegach kylegach requested a review from jonniebigodes as a code owner June 20, 2025 21:10
@kylegach kylegach added documentation patch:yes Bugfix & documentation PR that need to be picked to main branch ci:docs Run the CI jobs for documentation checks only. labels Jun 20, 2025
Copy link
Copy Markdown
Contributor

@greptile-apps greptile-apps Bot left a comment

Choose a reason for hiding this comment

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

LGTM

2 files reviewed, no comments
Edit PR Review Bot Settings | Greptile

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Jun 20, 2025

View your CI Pipeline Execution ↗ for commit 69ac138

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 1m 21s View ↗

☁️ Nx Cloud last updated this comment at 2025-07-14 17:17:14 UTC

@valentinpalkovic
Copy link
Copy Markdown
Contributor

@jonniebigodes Can you take a look?

@jonniebigodes jonniebigodes merged commit c72e13e into next Jul 14, 2025
8 of 9 checks passed
@jonniebigodes jonniebigodes deleted the fix-vitest-setup-docs branch July 14, 2025 17:18
ghengeveld pushed a commit that referenced this pull request Jul 15, 2025
Docs: Fix incorrect `vitest.setup.ts` snippet
(cherry picked from commit c72e13e)
@github-actions github-actions Bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jul 15, 2025
@ndelangen ndelangen removed the patch:yes Bugfix & documentation PR that need to be picked to main branch label Oct 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:docs Run the CI jobs for documentation checks only. documentation patch:done Patch/release PRs already cherry-picked to main/release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants