You should have both of these installed before you start testing.
pub global activate critical_test
pub global activate dcli
Critical tests provides the ability to setup a no. of pre and post test hooks.
Nginx-LE relies on these hooks to correctly configure the test environment.
In particular the pre test setup hook compiles and installs the auth, deploy and cleanup hooks onto your path (using the DCli path ~/.dcli/bin) before running the tests.
If you can't use critical_test for some reason then you can directly run the setup script:
To run the unit tests: