Jestjs tests not working in Gitlab CI
I am trying to run Jest tests in Gitlab CI. The tests are running locally, but when I run them on Gitlab CI I get the following error:
Test suite failed to run
ProcessTerminatedError: cancel after 2 retries!
at Farm.<anonymous> (node_modules/worker-farm/lib/farm.js:81:25)
at Array.forEach (native)
at Farm.<anonymous> (node_modules/worker-farm/lib/farm.js:75:36)
at ontimeout (timers.js:386:14)
at tryOnTimeout (timers.js:250:5)
at Timer.listOnTimeout (timers.js:214:5)
A worker process has quit unexpectedly! Most likely this is an
initialization error.
error Command failed with exit code 1.
I tried adding the --runInBand parameter, but that results in a segmentation fault. And I tried the --maxWorkers option as well, but that results in the same error. Any ideas how to solve this problem?
+3
source to share
1 answer