Commit 7f11487
authored
fix(examples): update vitest config paths for packages and apps in
### Description
The current `--with-vitest` example's root vitest.config.ts has `*` in
the paths which seems to be invalid as shown below:
```
The project root contains the "*" character (/workspace/tmp/my-turborepo/packages/*), which may not work when running Vite. Consider renaming the directory / file to remove the characters.
The project root contains the "*" character (/workspace/tmp/my-turborepo/apps/*), which may not work when running Vite. Consider renaming the directory / file to remove the characters.
DEV v3.2.4 /workspace/tmp/my-turborepo
No test files found. You can change the file name pattern by pressing "p"
0
include: **/*.{test,spec}.?(c|m)[jt]s?(x)
exclude: **/node_modules/**, **/dist/**, **/cypress/**, **/.{idea,git,cache,output,temp}/**, **/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*
1
include: **/*.{test,spec}.?(c|m)[jt]s?(x)
exclude: **/node_modules/**, **/dist/**, **/cypress/**, **/.{idea,git,cache,output,temp}/**, **/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build,eslint,prettier}.config.*
```
Removing `/*` sufix fixes this issue as show below:
```
› bun run test:projects:watch
$ vitest --watch
DEV v3.2.4 /workspace/tmp/my-turborepo
✓ 0 math/tests/math.test.ts (2 tests) 2ms
✓ 1 web/tests/math.test.ts (1 test) 1ms
✓ 1 docs/tests/math.test.ts (1 test) 1ms
Test Files 3 passed (3)
Tests 4 passed (4)
Start at 07:11:36
Duration 515ms (transform 43ms, setup 0ms, collect 31ms, tests 4ms, environment 626ms, prepare 139ms)
```
This is related to
#10659 (comment)
### Testing Instructions
Just run:
`bun run test:projects:watch`with-vitest (#10675)1 parent be6f7ba commit 7f11487
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
0 commit comments