[Bug]: Watch fails if SL (Steam Locomotive) is installed #14046
Closed
Description
Version
29.5.0
Steps to reproduce
- Install SL (Steam Locomotive); e.g.
brew install sl
- Clone my repo https://github.com/dvanoni/jest-watch-sl-bug
npm install
npx jest --watch
Expected behavior
npx jest --watch
runs and prints the following message:
No tests found related to files changed since last commit.
Press `a` to run all tests, or run Jest with `--watchAll`.
Watch Usage
› Press a to run all tests.
› Press f to run only failed tests.
› Press p to filter by a filename regex pattern.
› Press t to filter by a test name regex pattern.
› Press q to quit watch mode.
› Press Enter to trigger a test run.
Actual behavior
npx jest --watch
fails with the following message:
Determining test suites to run...
● Test suite failed to run
thrown: [Error]
Additional context
#13941 introduced support for Sapling which provides a command named sl
. This conflicts with the sl
command provided by SL (Steam Locomotive). When you have SL installed on your machine rather than Sapling, jest-changed-files
fails to run properly.
Environment
System:
OS: macOS 13.2.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Binaries:
Node: 18.15.0 - ~/.asdf/installs/nodejs/18.15.0/bin/node
npm: 9.5.0 - ~/.asdf/plugins/nodejs/shims/npm
npmPackages:
jest: ^29.5.0 => 29.5.0