Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find testMatch files if any folder in path starts with dot #9258

Closed
MaKCbIMKo opened this issue Dec 3, 2019 · 4 comments
Closed

Cannot find testMatch files if any folder in path starts with dot #9258

MaKCbIMKo opened this issue Dec 3, 2019 · 4 comments

Comments

@MaKCbIMKo
Copy link

馃悰 Bug Report

Jest cannot find testMatch files if any folder name in path starts with dot

To Reproduce

Rename any folder in project path to start with a dot (e.g. D:\my\path\.with\dot\project-root\)

Then we have two ways to reproduce (two different configs)

First jest config:

{
    ........
    rootDir: 'D:/my/path/.with/dot/project-root/' // (auto-generated)
    testMatch: [
        '<rootDir>/src/**/*.spec.ts'
    ],
    ........
}; 

Second jest config:

{
    ........
    testMatch: [
        'D:/my/path/.with/dot/project-root/src/**/*.spec.ts'
    ],
    ........
}; 

In both cases no tests will be found.

Expected behavior

All test are found in case if folder starts with dot.

Note

With following jest config all tests are found

{
    ........
    rootDir: 'D:/my/path/.with/dot/project-root/' // (auto-generated)
    testMatch: [
        '**/*.spec.ts'
    ],
    ........
}; 

envinfo

  System:
    OS: Windows 10 10.0.18362
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
  Binaries:
    Node: 12.13.1 - C:\Program Files\nodejs\node.EXE
    npm: 6.12.1 - C:\Program Files\nodejs\npm.CMD
  npmPackages:
    jest: ^24.9.0 => 24.9.0 
@MaKCbIMKo
Copy link
Author

Partially related to issue #8520

@github-actions
Copy link

This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Feb 17, 2023
@github-actions
Copy link

This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 19, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants