We're updating the issue view to help you get more done. 

Add on-testing-complete hook

Description

When a test runner runs async tests created with cljs.test/async there is no reliable way to return the control from the async code in the test suite to the test runner. This is problematic since the test script might need the tests results to proceed or terminate.

A function to be called after all tests are done is proposed: cljs.test/on-testing-complete-fn and it would take the test summary as its only argument

It can be set by the user by calling cljs.test/set-on-testing-complete! which should be callable from JS (^:export)

Notes:
In the patch, the function cljs.test/successful? also has the ^:export metadata to be called from JS test runners.
The code was tested manually with V8, Spidermonkey, Nashorn, SlimerJs, and PhantomJS but not with JavaScript Core.

Environment

None

Status

Assignee

Unassigned

Reporter

Sebastian Bensusan

Labels

Approval

None

Patch

Code

Fix versions

Affects versions

0.0-3269

Priority

Minor