Skip to content

No tests found on Windows with Jenkins #5935

Description

@Saibamen

Is this a bug report?

Yes

Did you try recovering your dependencies?

Yes

Which terms did you search for in User Guide?

test

Environment

From npx create-react-app --info:
(node:2604) UnhandledPromiseRejectionWarning: Error: The system cannot find the path specified.

System:
OS: Microsoft Windows Version 10.0.14393
CPU: x64 Intel(R) Xeon(R) CPU E5-2420 0 @ 1.90GHz
Binaries:
Node: 10.13.0
npm: 6.4.1
npmPackages:
"@coreui/coreui": "^2.1.1",
    "@coreui/icons": "0.3.0",
    "@coreui/react": "^2.1.0",
    "bootstrap": "^4.1.3",
    "classnames": "^2.2.6",
    "flag-icon-css": "^3.2.1",
    "font-awesome": "^4.7.0",
    "node-sass": "^4.10.0",
    "prop-types": "^15.6.2",
    "react": "^16.6.1",
    "react-dom": "^16.6.1",
    "react-helmet": "5.2.0",
    "react-loadable": "^5.5.0",
    "react-redux": "^5.1.0",
    "react-router-bootstrap": "^0.24.4",
    "react-router-dom": "^4.3.1",
    "react-router-redux": "^5.0.0-alpha.8",
    "react-scripts": "2.1.1",
    "reactstrap": "^6.5.0",
    "redux": "^4.0.1",
    "redux-immutable": "4.0.0",
    "redux-thunk": "^2.3.0",
    "rimraf": "^2.6.2",
    "simple-line-icons": "^2.4.1"

Steps to Reproduce

  1. Write test file and save it in src folder as App.test.js
  2. npm run react-scripts test --env=jsdom --no-watchman
    or
  3. npm react-scripts test --env=jsdom --coverage

Reproduction repository: https://github.com/Saibamen/react_test

Expected Behavior

Tests should be executed

Actual Behavior

No tests found

react-scripts test --env=jsdom --no-watchman
00:02:06.736 
00:02:11.011 No tests found
00:02:11.011 In C:\Program Files (x86)\Jenkins\workspace\xxx\src\Web\xxx.Web\ClientApp
00:02:11.011   50 files checked.
00:02:11.011   testMatch: C:\Program Files \(x86\)\Jenkins\workspace\xxx\src\Web\xxx.Web\ClientApp\src\**\__tests__\**\*.{js,jsx,ts,tsx},C:\Program Files \(x86\)\Jenkins\workspace\xxx\src\Web\xxx.Web\ClientApp\src\**\?(*.)(spec|test).{js,jsx,ts,tsx} - 0 matches
00:02:11.011   testPathIgnorePatterns: \\node_modules\\ - 50 matches
00:02:11.011 Pattern:  - 0 matches
00:02:11.045 npm ERR! code ELIFECYCLE
00:02:11.046 npm ERR! errno 1
00:02:11.048 npm ERR! xxx@0.1.0 test:ci: `react-scripts test --env=jsdom --no-watchman`
00:02:11.049 npm ERR! Exit status 1
00:02:11.049 npm ERR! 
00:02:11.049 npm ERR! Failed at the xxx@0.1.0 test:ci script.
00:02:11.050 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
00:02:11.086 
00:02:11.087 npm ERR! A complete log of this run can be found in:
00:02:11.087 npm ERR!     C:\Users\jenkins\AppData\Roaming\npm-cache\_logs\2018-11-30T12_24_24_901Z-debug.log
00:02:11.109 Build step 'Execute Windows batch command' marked build as failure

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions