Arc unit with Jest hangs

Hi,

I’m trying to setup arc unit to use Jest but have not been able to make it work, perhaps someone here has managed to get it to work and can offer some advice. At the moment it appears that it should work but it unfortunately just hangs and never runs any test.

So I’m using loading this library https://github.com/opendoor-labs/arcanist-jest-unit-tests as the test engine.

My .arcconfig looks like

{
project.name” : “example”,
“load”: [
“tools/arc-tslint”,
“tools/arcanist-jest-unit-tests”
],
“phabricator.uri” : “url”,
“unit.engine”: “JestUnitTestEngine”
}

arc unit --everything --trace --no-coverage
 ARGV  '/Users/me/dev/arcanist/bin/../scripts/arcanist.php' 'unit' '--everything' '--trace' '--no-coverage'
 LOAD  Loaded "phutil" from "/Users/me/dev/libphutil/src".
 LOAD  Loaded "arcanist" from "/Users/me/dev/arcanist/src".
Config: Reading user configuration file "/Users/me/.arcrc"...
Config: Did not find system configuration at "/etc/arcconfig".
Working Copy: Reading .arcconfig from "/Users/me/dev/project/.arcconfig".
Working Copy: Path "/Users/me/dev/project" is part of `git` working copy "/Users/me/dev/project".
Working Copy: Project root is at "/Users/me/dev/project".
Config: Did not find local configuration at "/Users/me/dev/project/.git/arc/config".
Loading phutil library from '/Users/me/dev/project/tools/arc-tslint'...
Loading phutil library from '/Users/me/dev/project/tools/arcanist-jest-unit-tests'...
>>> [0] <exec> $ git ls-files -z
<<< [0] <exec> 7,724 us
>>> [1] <exec> $ /Users/me/dev/project/node_modules/.bin/jest --json

It just hangs there. When I run the /Users/me/dev/project/node_modules/.bin/jest --json
command manually it all runs fine. So I have no idea why it won’t run in arc unit.

Any help appreciated!

I added --forceExit to the command and it stopped hanging, but it’s still not working as I would expect. It doesn’t output anything for failed tests at the moment.