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
{{ message }}
Repository navigation
Jest: <rootDir> in testPathIgnorePatterns is matched literally #251
Jest replaces a leading <rootDir> in testPathIgnorePatterns with the root directory. extractTestPatterns in src/repo/runner-universe.ts keeps the token, and compileIgnoreRegexes compiles it literally, so the pattern never matches. <rootDir>/… is the form the Jest docs recommend.
Repro:jest.config.js with testMatch: ['**/*.test.js'] and testPathIgnorePatterns: ['<rootDir>/e2e/']; files src/a.test.js, e2e/helper.js, e2e/flow.test.js. Change e2e/helper.js.
Expected:e2e/flow.test.js is not in the test universe, as with testPathIgnorePatterns: ['/e2e/'].
Actual:testFilePaths contains e2e/flow.test.js, it is selected, and the planned command is npx --no-install jest --config jest.config.js e2e/flow.test.js. Jest 29 exits 1 with No tests found, exiting with code 1.
Activity