Skip to content

vscode 1.32.1 jest debug cannot find test files specified if running from current file #70050

@sativ01

Description

@sativ01
  • VSCode Version: 1.32.1
  • OS Version: Win 7

Steps to Reproduce:

  1. launch config file:
{
      "type": "node",
      "request": "launch",
      "name": "Jest Current File",
      "program": "${workspaceFolder}/node_modules/.bin/jest",
      "args": [
        "${relativeFile}",
        "--config",
        "${workspaceFolder}/tests/jest.config.js"
      ],
      "console": "integratedTerminal",
      "internalConsoleOptions": "neverOpen",
      "disableOptimisticBPs": true,
      "windows": {
        "program": "${workspaceFolder}/node_modules/jest/bin/jest",
      }
    }
  1. Open file that you want to test, e.g. Component.spec.jsx and run the above launch configuration
  2. Output:
Debugger listening on ws://127.0.0.1:21033/...
For help see https://nodejs.org/en/docs/inspector
Debugger attached.
No tests found, exiting with code 1
Run with `--passWithNoTests` to exit with code 0
In C:\nextgen\ng\ui\common.ui
  171 files checked.
  testMatch: C:/nextgen/ng/ui/common.ui/utils/**/*.spec.(es6|jsx),C:/nextgen/ng/ui/common.ui/components/**/*.spec.(es6|jsx) - 33 matches
  testPathIgnorePatterns: \\node_modules\\ - 171 matches
  testRegex:  - 171 matches
Pattern: components\form\__tests__\DateTimePicker.spec.jsx - 0 matches
Waiting for the debugger to disconnect...

Does this issue occur when all extensions are disabled?: Yes

It works fine with previous version of VS Code

Metadata

Metadata

Labels

*as-designedDescribed behavior is as designeddebugDebug viewlet, configurations, breakpoints, adapter issues

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions