Commit db8f89a
authored
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 <[email protected]>1 parent 20bf97b commit db8f89a
File tree
3 files changed
+4
-4
lines changed- docs/site/content/docs/guides/tools
- examples/with-vitest
3 files changed
+4
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | 350 | | |
351 | | - | |
| 351 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| |||
0 commit comments