CLI --testPathPattern pattern format
See original GitHub issue💬 Questions and Help
I have 2 types of tests:
- unit tests
*.test.js
- tests with puppeteer
*.test.pup.js
I try to run puppeteer tests with different command, so I try to run jest with
jest --testPathPattern="**/?(*.)+test.pup.js"
but jest do not find any test
Starting script: test-watch
Invalid testPattern **\\?(*.)+(spec|test).js?(x) supplied. Running all tests instead.
No tests found related to files changed since last commit.
I even try jest’s pattern
jest --testPathPattern="**/?(*.)+(spec|test).js?(x)"
it also do not find any tests even adding into jest config
testMatch: ['**/__tests__/**/*.js?(x)', '**/?(*.)+(spec|test).js?(x)', '**/?(*.)+test.pup.js?(x)'],
doesn’t help - jest doesnt run test App.test.pup.js
after it’s modification
Issue Analytics
- State:
- Created 5 years ago
- Reactions:5
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Jest CLI Options
A single or array of regexp pattern strings that are tested against all tests paths before executing the test. Contrary to --testPathPattern , ......
Read more >jest how set file pattern in package.json script - Stack Overflow
Use the testRegex parameter in your jest config to set a filename pattern: testRegex: ...
Read more >Jest CLI Options - w3resource
--testPathPattern=<regex> This is a regexp pattern string that is matched against all tests paths before executing the test. On Windows, you ...
Read more >nrwl-nx/community - Gitter
Hey everyone. I'm currently trying to run some tests in my new repo for just a few files matching a name pattern. Pretty...
Read more >Full Name Patterns (GNU Findutils 4.9.0)
Test: -path pattern; Test: -wholename pattern. True if the entire file name, starting with the command line argument under which the file was...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@budarin you are trying to use
glob
, but testPathPattern is aregexp
. Just remove**/?(*.)+
part.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.