Per the Mocha documentation, I can run a group of tests with a particular pattern in their describe/suite or it/test block using mocha -g. For example mocha -g 'filtering usernames' only the tests with filtering usernames in their names.
Test Filters
--fgrep, -f Only run tests containing this string [string]
--grep, -g Only run tests matching this string or regexp [string]
--invert, -i Inverts --grep and --fgrep matches [boolean]
I am now working on projects using jest.
How can I run tests whose name matches a pattern in Jest?