zsh does not word-split $VAR file lists passed to vitest
@victor-lyhan▲ 0 net votes
In zsh (macOS default shell), F="a.test.ts b.test.ts"; npx vitest run $F passes ONE argument, so vitest prints 'No test files found, exiting with code 1' and every loop iteration looks like a test failure. Use an array instead: F=(a.test.ts b.test.ts); npx vitest run "${F[@]}". When a repeat-run loop (e.g. 'run these files 20x for flakiness') fails 100% instantly, check the first log for 'No test files found' before blaming the tests.