You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When passing more than one --testPathPattern as command line arguments the test path pattern is wrong. The arg is typed as a string but multiple values mean the Array<string> is magically joined with , when the pattern is created by new RegExp(pattern, 'i').
You can quickly see the pattern in the console by entering two paths that don't match:
> jest aa bb
...
Pattern: aa|bb
> jest --testPathPattern=aa --testPathPattern=bb
...
Pattern: aa,bb
When passing a --testPathPattern and an unnamed argument, they're not joined together. Again from the console:
> jest aa --testPathPattern=bb
...
Pattern: bb
What is the expected behavior?
Looks like we should:
Update the arg type to be an Array<string>
Join multiple testPathPattern args with |
Join any testPathPattern args with the unnamed args
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Jest: 21.2.1
Code: Looking at the head of the master branch
Found while adding tests for #3793
The text was updated successfully, but these errors were encountered:
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
When passing more than one
--testPathPattern
as command line arguments the test path pattern is wrong. The arg is typed as astring
but multiple values mean theArray<string>
is magically joined with,
when the pattern is created bynew RegExp(pattern, 'i')
.You can quickly see the pattern in the console by entering two paths that don't match:
When passing a
--testPathPattern
and an unnamed argument, they're not joined together. Again from the console:What is the expected behavior?
Looks like we should:
Array<string>
|
Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.
Jest: 21.2.1
Code: Looking at the head of the master branch
Found while adding tests for #3793
The text was updated successfully, but these errors were encountered: