-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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 tests found' when directory has a '-' #1567
Comments
Can you post your configuration? |
"jest": { |
for people finding this issue, would it be possible to close the duplicates, noting which issue they are a duplicate of, so that only the issue where actual work towards fixing it happens stays open? |
This isn't resolved. :-\ my config: const {defaults} = require('jest-config');
const wd = process.cwd().replace(/\//g, '\\/');
console.log(wd);
module.exports = {
// moduleDirectories: ["node_modules", ".", "src", "tests"],
moduleFileExtensions: [...defaults.moduleFileExtensions, 'ts', 'tsx'],
projects: [
{
displayName: 'End to End',
preset: "jest-puppeteer",
globalSetup: "<rootDir>/tests/support/acceptance/setup.js",
globalTeardown: "<rootDir>/tests/support/acceptance/teardown.js",
testEnvironment: "<rootDir>/tests/support/acceptance/puppeteer-environment.js",
testRegex: `${wd}/(.+)\\.e2e\\.ts`,
},
{
displayName: 'Unit and Integration',
setupTestFrameworkScriptFile: '<rootDir>/tests/support/setup.js',
testRegex: "(.+)test\\.ts"
}
],
transform: {
"^.+\\.(t|j)sx?$": "ts-jest"
},
globals: {
"ts-jest": {
tsConfigFile: "tsconfig.jest.json"
}
},
} output $ yarn test --verbose
yarn run v1.6.0
$ ./node_modules/.bin/jest --config ./jest.config.js --no-cache --verbose
\/home\/me\/Development\/NullVoxPopuli\/react-vs-ember\/testing\/react
No tests found
In /home/me/Development/NullVoxPopuli/react-vs-ember/testing/react
182 files checked.
testMatch: - 182 matches
testPathIgnorePatterns: /node_modules/ - 182 matches
testRegex: \/home\/me\/Development\/NullVoxPopuli\/react-vs-ember\/testing\/react/(.+)\.e2e\.ts - 0 matches
In /home/me/Development/NullVoxPopuli/react-vs-ember/testing/react
182 files checked.
testMatch: - 182 matches
testPathIgnorePatterns: /node_modules/ - 182 matches
testRegex: (.+)test\.ts - 0 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.
|
given that all three issues are closed, you probably want to file that as a new issue. |
I'm actually giving up on jest. Mocha "just worked" (by following the docs). :-\ |
That's entirely your call, but I'd still recommend filing your issue as a new issue so that devs are notified of it, and people who aren't you (but also run into this problem) may eventually get the fix they need still anyway. |
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. |
I am using [email protected], when my directory that include my git repo has a '-', I see the following behavior:
No tests found
74 files checked.
testPathDirs: <DIRECTORY_PATH> - 0 matches
testRegex: /tests/.*.(ts|tsx|js)$ - 1 match
testPathIgnorePatterns: \node_modules\ - 74 matches
if I rename the repo directory not to have a dash, this will work fine and I can see a test. I am assuming this not an expected behavior.
The text was updated successfully, but these errors were encountered: