Skip to content

jest --watch fill fail on Windows machines if git is not in the user's PATH #283

Open
@ashwinm76

Description

@ashwinm76

Environment

  1. node -v: 6.9.4

  2. npm -v: 3.10.10

  3. npm ls react-scripts (if you haven’t ejected): `-- (empty)

  4. Operating system: Windows 10 Home 64-bit build 16299.309

Steps to Reproduce

Open any project with jest tests in it on a Windows 10 machine, where git is not in your PATH env variable. Note that this applies to the PATH as seen by cmd.exe

Expected Behavior

The jest extension runs the tests once, then runs jest in watch mode.

Actual Behavior

Watch mode fails with the error "watch is not supported without git/hg", presumably because jest cannot see git.exe in the path.

It would be very helpful to users on Windows to have the vscode-jest extension mention on it's page that git.exe must be in the PATH. This is easy to miss if like me you are running vscode with the default terminal shell set to git-bash, because you will find that the vscode-jest extension fails to run jest in watch mode, but manually running "jest --watch" in vscode's git-bash terminal works fine.

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