Skip to content

feat: match --test filters against the full describe-path#13

Merged
kevinccbsg merged 5 commits into
mainfrom
feature/describe-aware-test-filter
Jul 4, 2026
Merged

feat: match --test filters against the full describe-path#13
kevinccbsg merged 5 commits into
mainfrom
feature/describe-aware-test-filter

Conversation

@kevinccbsg

Copy link
Copy Markdown
Member

Summary

  • --test / testNames filters now match a case-insensitive substring of the full describe-path ("Describe > nested > test name") instead of only the it() name — mirroring twd-cli's semantics, so filtering by a describe name runs all tests under it (and cross-boundary filters like "login flow > shows error" work).
  • New pure helpers src/browser/buildTestPath.ts and src/browser/filterTests.ts (ported from twd-cli), wired into handleRunCommand.
  • NO_MATCH error now lists available tests as full describe-paths so agents can construct a working retry.
  • README updated; design spec included under docs/superpowers/specs/.

Why

AI agents (and developers) assume describe-name filtering is default behavior, as in Vitest/Jest — the name-only match was a recurring source of friction with agent-driven runs.

Testing

  • 12 new unit tests for path building and filtering; full suite 85/85 passing, build clean.

🤖 Generated with Claude Code

@kevinccbsg kevinccbsg merged commit b3ec11b into main Jul 4, 2026
5 checks passed
@kevinccbsg kevinccbsg deleted the feature/describe-aware-test-filter branch July 4, 2026 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant