-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error message for sl
(steam locomotive)
#15052
Conversation
When running jest in watch mode, with `sl` installed (https://github.com/mtoyoda/sl), it errors out with the following message: ``` ● Test suite failed to run thrown: [Error] ``` This is bad because the error is extremely hard to debug. This change makes it error as follows: ``` ● Test suite failed to run Command failed with ENAMETOOLONG: sl status -amnu /Users/rmartine/dev/ias-backstage/packages/backend spawn ENAMETOOLONG ``` This, at least, points people in the right direction. See also: jestjs#14046
✅ Deploy Preview for jestjs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
minor: just make the error message say "This is probably because you have Steam Locomotive installed. Jest cannot be used with Steam Locomotive installed." |
Well, now it can. See my other PR: #15053 |
|
||
throw error; | ||
} | ||
const result = await execa('sl', args, {cwd, env}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we make the same change for all the VCS checks? trying to silence the error doesn't really seem useful in this case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the change, added changelog entry!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
When running jest in watch mode, with
sl
installed(https://github.com/mtoyoda/sl), it errors out with the following
message:
This is bad because the error is extremely hard to debug.
This change makes it error as follows:
This, at least, points people in the right direction.
See also: #14046
Test plan
Went to a project that uses jest, ensured
sl
was installed and on$PATH
, and ran:$ node /path/to/your/JestClone/packages/jest/bin/jest --watch
Confirmed error was as before:
Made my changes, re-ran:
$ node /path/to/your/JestClone/packages/jest/bin/jest --watch
Confirmed error message is now descriptive: