How to configure .arcunit

#1

Hello,
Short-term question: Does anyone have documentation around configuring .arcunit. Long-term questio: I’'m working in a monolith, and I need to run unit tests based on each sub-directory’s (project’s) yarn test script. I imagine this being done in .arcunit.

0 Likes

#2

You can configure it by .arcunit or directly in .arcconfig. For example, here’s my .arcconfig (in a php project):

{
    "phabricator.uri" : "https://XXX.XXX.com/",
    "repository.callsign": "XYZ",
    "unit.engine": "PhpunitTestEngine",
    "unit.phpunit.binary": "vendor/bin/simple-phpunit",
    "phpunit_config": "var/build/phpunitTest.xml",
    "load": [
        "arc-phpstan"
    ]
}

If it does not fit your use case, you have the .arcunit file phabricator is using and some examples in this task. Or, you have the option to create a new Test class to integrate with your system extending ArcanistUnitTestEngine, as described in the docs.

0 Likes