For AI agents: the complete documentation index is available at https://rstest.rs/llms.txt, the full documentation bundle is available at https://rstest.rs/llms-full.txt, and this page is available as Markdown at https://rstest.rs/config/test/test-name-pattern.md.
close
  • English
  • testNamePattern

    • Type: string | RegExp
    • Default: undefined
    • CLI: -t=<value>, --testNamePattern=<value>

    Filter which tests run by matching their full name against a RegExp or regex pattern string (compiled with new RegExp()).

    The full name joins enclosing describe suite names and the test name with spaces (or ' > ' when the pattern contains >).

    CLI
    rstest.config.ts
    npx rstest -t=bar

    See Filter by test name for matching rules, full-name examples, and negative-lookahead regex patterns.