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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No longer able to find tests on Windows in 23.2.0, after working in 23.1.0 #6609

Closed
JoshuaKGoldberg opened this issue Jul 4, 2018 · 2 comments

Comments

@JoshuaKGoldberg
Copy link
Contributor

🐛 Bug Report

$ jest --config ./test/unit/jest.config.js
No tests found
In D:\Code\WebClient\
  1319 files checked.
  testMatch: D:\Code\WebClient\src\**\?(*.)test.ts?(x) - 0 matches
  testPathIgnorePatterns: \\node_modules\\ - 1319 matches
Pattern:  - 0 matches
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

I promise you, I write unit tests! ☹

To Reproduce

Steps to reproduce the behavior:

  • Use the following Jest config on Windows with a test under src\file.test.ts:
/*!
 * Copyright Microsoft Corporation. All rights reserved.
 */

const path = require("path");

module.exports = {
    collectCoverageFrom: [
        "src/*/**/*.ts*",
        "!src/*/**/*.stubs.ts*",
        "!src/typings/**",
    ],
    coverageDirectory: "./reports/coverage",
    globals: {
        "ts-jest": {
            tsConfigFile: "./tsconfig.test.json",
        },
    },
    moduleFileExtensions: [
        "js",
        "ts",
        "tsx",
    ],
    rootDir: path.join(__dirname, "../../"),
    setupTestFrameworkScriptFile: "<rootDir>/test/unit/setup",
    testMatch: [
        "<rootDir>/src/**/?(*.)test.ts?(x)",
    ],
    transform: {
        "^.+\\.tsx?$": "ts-jest",
    },
};

Expected behavior

Under 23.1.0, it finds test files.
Under 23.2.0, it does not.

Run npx envinfo --preset jest

Paste the results here:

 System:
    OS: Windows 10
    CPU: x64 Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz
  Binaries:
    Yarn: 1.6.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
    npm: 5.10.0 - D:\Code\WebClient\node_modules\.bin\npm.CMD
@JoshuaKGoldberg
Copy link
Contributor Author

D'oh, duplicate of #6546.

@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 May 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant