这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@mfyuu
Copy link
Contributor

@mfyuu mfyuu commented Jul 16, 2025

Description

Update the test:projects script in the with-vitest example to use Vitest's projects feature directly.

# examples/with-vitest/package.json
- "test:projects": "turbo run test",
+ "test:projects": "vitest run",

Currently, the test:projects script runs turbo run test, which leverages Turborepo's package-level caching. However, given the script name and the example's hybrid approach documentation, it seems more appropriate for this command to use vitest run directly to demonstrate Vitest's projects feature.

Changes made:

  • Updated package.json to use vitest run for the test:projects script
  • Updated README.md to accurately describe what test:projects does
  • Updated the documentation in docs/site/content/docs/guides/tools/vitest.mdx to reflect the correct usage

Testing Instructions

  1. Clone the repository and navigate to the examples/with-vitest directory
  2. Install dependencies: pnpm install
  3. Build the shared config: pnpm --filter @repo/vitest-config build
  4. Run the following commands to verify the fix:
    • pnpm test - Should run tests using Turborepo (with caching)
    • pnpm test:projects - Should run tests using Vitest's projects feature directly
    • pnpm test:projects:watch - Should run tests in watch mode using Vitest's projects feature
  5. Verify that test and test:projects now have different behaviors as intended

@mfyuu mfyuu requested review from a team and anthonyshew as code owners July 16, 2025 04:49
@mfyuu mfyuu requested a review from tknickman July 16, 2025 04:49
@turbo-orchestrator turbo-orchestrator bot added area: docs Improvements or additions to documentation area: examples Improvements or additions to examples needs: triage labels Jul 16, 2025
@vercel
Copy link
Contributor

vercel bot commented Jul 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
examples-basic-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 2:42am
examples-designsystem-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 2:42am
examples-tailwind-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 2:42am
examples-vite-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 2:42am
turbo-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2025 2:42am

@vercel
Copy link
Contributor

vercel bot commented Jul 16, 2025

@namidapoo is attempting to deploy a commit to the Vercel Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

@anthonyshew anthonyshew left a comment

Choose a reason for hiding this comment

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

Hi, thanks for this. Can you remove the unrelated docs changes (the newline changes and dangling commas)?

The 'test:projects' script was incorrectly using "turbo run test" instead of
"vitest run", which didn't match the intended behavior of using Vitest's
projects feature directly.
@mfyuu mfyuu force-pushed the fix/vitest-scripts branch from b265d34 to 7e043c9 Compare July 16, 2025 13:30
@mfyuu
Copy link
Contributor Author

mfyuu commented Jul 16, 2025

Hi, thanks for this. Can you remove the unrelated docs changes (the newline changes and dangling commas)?

@anthonyshew Thanks for the feedback!
Those formatting changes (newlines and dangling commas) weren't intentional - they were applied by git hooks.
I've addressed this in 7e043c9

Copy link
Contributor

@anthonyshew anthonyshew left a comment

Choose a reason for hiding this comment

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

Thanks, let's merge!

@anthonyshew anthonyshew enabled auto-merge (squash) July 17, 2025 02:40
@anthonyshew anthonyshew merged commit db8f89a into vercel:main Jul 17, 2025
35 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Improvements or additions to documentation area: examples Improvements or additions to examples

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants