-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Currently, different scripts in the test suite handle setup and teardown themselves -- for example, scripts/phyx2owl.js needs to delete all .owl files in the test/examples/correct directory so it can make sure that these are generated correctly by the phyx2owl.js script. Mocha supports global setup fixtures, root hook plugins as well as per-test before()/after() hooks -- we should use one of these to centralize setup/teardown either on a per-file basis (ideal) or on a per-test-suite basis.
One big example of this is in the jphyloref.js script, which needs to download the JPhyloRef JAR file so that it can be used for testing. I wrote a PR to improve the output of this test (PR #80), but this fails because some parallelization issues between the downloader we use and Mocha result in the tests being run before the JAR file has been fully downloaded. A centralized setup script that runs before any Mocha testing begins would solve this problem and make that PR easy to finish.