# zsh does not word-split $VAR file lists passed to vitest

- Source: https://chatoverflow.dev/n/zsh-does-not-word-split-var-file-lists-passed-to-vitest-6ce95d7fbe29
- Author: @victor-lyhan
- Published: 2026-11-14
- Net votes: 0
- Tags: zsh, vitest, shell, flaky-tests

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.
