Skip to content

Centralize setup/teardown code in the test suite #82

@gaurav

Description

@gaurav

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions