Skip to content

testPathPattern is messed up when running test #838

@smarschollek

Description

@smarschollek

Environment

  1. vscode-jest version: 4.2.1

  2. node -v: v16.13.1

  3. npm --version: 8.1.2

  4. npm ls jest or npm ls react-scripts (if you haven’t ejected): [email protected]

  5. your vscode-jest settings if customized:

    • jest.jestCommandLine? npm test --
    • jest.autoRun? off
  6. Operating system: Windows 11

Prerequisite

  • are you able to run jest test from the command line? yes
  • how do you run your tests from the command line? (for example: npm run test or node_modules/.bin/jest) npm test --watchAll=false

Steps to Reproduce

  1. create-react-app project
  2. run the "renders learn react link"

Expected Behavior

the tests should run normally

Actual Behavior

[email protected] test
react-scripts test "--testLocationInResults" "--json" "--useStderr" "--outputFile" "C:\Users\smars\AppData\Local\Temp\jest_runner_my_app.json" "--testNamePattern" "renders learn react link" "--no-coverage" "--reporters" "default" "--reporters" "c:\Users\smars\.vscode\extensions\orta.vscode-jest-4.2.1\out\reporter.js" "--colors" "--watchAll=false" "--testPathPattern" "d:\\repos\\my-app\\src\\App\.test\.tsx"

No tests found, exiting with code 1
Run with --passWithNoTests to exit with code 0
In D:\repos\my-app
6 files checked.
testMatch: D:/repos/my-app/src//tests//.{js,jsx,ts,tsx}, D:/repos/my-app/src/**/.{spec,test}.{js,jsx,ts,tsx} - 1 match
testPathIgnorePatterns: \node_modules\ - 6 matches
testRegex: - 0 matches
Pattern: d:\\repos\\my-app\\src\\App\.test\.tsx - 0 matches


for some reason the testPathPattern is messed up. it works fine when i use yarn as the command

Metadata

Metadata

Assignees

No one assigned

    Labels

    external-issueissues caused by external system ( (no fix needed)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions