Skip to content

bug: running without suite names fails with 'No matching suites found' #29

@witqq

Description

@witqq

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions