fix(examples): correct 'test:projects' script to use vitest directly (#10683)
### Description
Update the `test:projects` script in the `with-vitest` example to use
Vitest's projects feature directly.
```diff
# 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
Co-authored-by: namidapoo <83203852+ve1997@users.noreply.github.com>