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)
In the patch, the function cljs.test/successful? also has the ^:export metadata to be called from JS test runners.
Added :end-run-test event to cljs.test and a dummy event handler for it.
For API consistency this should also be in the blocks of `test-all-vars` in `test-ns`, `test-var` and `test-vars`.
Happy to see a new ticket + patch that addresses the consistency issue.
Leon, I filled to address your point. Feel free to add any other API inconsistencies that :end-run-tests introduced.