Skip to content

ClojureScript test harness should exit process with non-zero value on error/failure #864

@dgr

Description

@dgr

Today, the ClojureScript test harness exits the process with a zero exit code regardless of the outcome of the tests. Other harnesses (e.g., Clojure JVM and Babashka) exit with a non-zero value upon error/failure of one or more tests. When the user is just running tests against ClojureScript (e.g., with bb test-cljs or bb test cljs) this doesn't present any problem because the test summary report appears at the end of the test and it's obvious that some tests have failed because of the output. But when the user executes multiple tests, using bb test-all or bb test cljs jvm bb, the ClojureScript failures appear far up in the CLI output and may be missed by the user. It would be better if the tests stopped immediately. Most of the Babashka tasks for running tests use shell to invoke the actual test-running command. Babashka's shell will throw upon receiving a non-zero exit code, which will then stop the tests, but this is defeated by the ClojureScript harness's behavior of returning zero regardless.

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