Async tests prematurely terminate in Node

Description

If you run cljs.test tests in Node where any are async, things may not terminate properly.

In this example, the js/setTimeout keeps Node alive, but something may happen near the very end of execution that causes failure.

src/foo/runner.cljs

src/foo/core_test.cljs

Here is what execution with Node looks like:

Compare this with Nashorn:

Likewise, this works properly with Planck:

and Lumo:

The only reason for illustrating Planck and Lumo (which is based on Node) is to suggest that some reasonable small tweak that would make this work in Node is within reach.

Environment

{:deps {org.clojure/clojurescript {:mvn/version "1.10.238"}}}

Assignee

Mike Fikes

Reporter

Mike Fikes

Labels

Approval

Accepted

Patch

Code and Test

Priority

Major
Configure