-
-
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
Sporadic "Command failed with exit code 1" but no test failure #11601
Comments
In some cases, I also see some of my tests timing out. This is a problem of myself, of course, but could jest maybe fail to show up a proper timeout error if the test is running asynchronously? |
This is weird:
In the very first line of my (async) test, I do exactly this and set the timeout to 10000 ms. Apparently my test times out even before it starts ... |
This is the most obvious output I have gotten so far:
(https://github.com/LinqLover/downstream-repository-mining/runs/2885248978#step:8) |
Further investigation has revealed that the issue only appears when running tests from all test files together but not when I only run a single test file. I added some debugging statements at the end of each test and found out that sometimes jest indicates the success of one of these tests before the final console statement is printed! I guess something with asynchronous test execution is broken. Everything after an PS: I traced this further down and found out that in my case, the test execution will always be interrupted when the first asynchronous call to |
Reproduction$ git clone https://github.com/LinqLover/downstream-repository-mining.git
$ cd downstream-repository-mining
$ git checkout 0316d80141db5681eb53e59b306a0b13e851f7f8
$ yarn install
$ yarn test test/references.test.ts # optionally run with option -i
yarn run v1.22.10
$ cross-env NODE_OPTIONS=--experimental-vm-modules jest test/references.test.ts
(node:1712) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
RUNS test/references.test.ts
error Command failed with exit code 1. |
I have the same issue. |
Any solution? Bump |
same issues , any work around? |
I am facing the same issue after updating react-script from v4 to v5. any workaround or solution? |
same issue Solved it: it was caused by a forgotten |
I had this issue because I had a few obsolete snapshots. Removing them caused it to exit properly |
Also run into this randomly with Jest v29.5.0 .
|
This issue is stale because it has been open for 1 year with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 30 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
🐛 Bug Report
In the CI of my repository, I frequently see this error:
However, the log before does not show any failure, just some passing tests and some console outputs from the code under test. Locally, I am unable to reproduce this issue.
My tests are defined as asynchronous functions, but I have taken care to use
await
appropriately so, in theory, this should not be an issue. Nevertheless, it seems as if jest ends before all tests have been completed.To Reproduce
See link to repl below, unfortunately, the issue occurs sporadically only.
Expected behavior
Either the exit code should be zero, or there should be at least one failing test displayed, or there should be an error message if the test setup is wrong for whatever reason.
Link to repl or repo (highly encouraged)
Just check out my repository where I have collected a number of these flaky builds: LinqLover/downstream-repository-mining#65
envinfo
Thanks in advance!
The text was updated successfully, but these errors were encountered: