Description
testfold -e remote (without explicit suite names) fails with:
Error: No matching suites found:
While testfold unit workflow integration api mcp-tools e2e -e remote works fine.
testfold --dry-run -e remote also works correctly.
Root Cause
In runner.js:59 and orchestrator.js:33, empty array [] is truthy in JS:
// runner.js:59
const suitesToRun = suiteNames
? this.config.suites.filter((s) => suiteNames.includes(s.name) || ...)
: this.config.suites;
When no suite names are specified, CLI passes args._ which is [] (empty array from minimist). Empty array is truthy, so filter runs against empty list → 0 matches → error.
The --dry-run codepath has the correct check:
// cli/index.js:57 (dry-run) — correct
const suitesToRun = args.suites.length > 0
? config.suites.filter(...)
: config.suites;
Fix
Replace truthiness check with length check in two places:
runner.js:59:
const suitesToRun = suiteNames?.length
? this.config.suites.filter(...)
: this.config.suites;
orchestrator.js:33:
const suitesToRun = suiteNames?.length
? this.config.suites.filter(...)
: this.config.suites;
Version
testfold 0.3.0
Description
testfold -e remote(without explicit suite names) fails with:While
testfold unit workflow integration api mcp-tools e2e -e remoteworks fine.testfold --dry-run -e remotealso works correctly.Root Cause
In
runner.js:59andorchestrator.js:33, empty array[]is truthy in JS:When no suite names are specified, CLI passes
args._which is[](empty array from minimist). Empty array is truthy, so filter runs against empty list → 0 matches → error.The
--dry-runcodepath has the correct check:Fix
Replace truthiness check with length check in two places:
runner.js:59:
orchestrator.js:33:
Version
testfold 0.3.0