ClojureScript clojure.test does not print stacktrace for exceptions thrown during clojure.test/is

Description

When a `clojure.test/is` form inside of a `clojure.test/deftest` form is evaluated while executing tests, and an exception is thrown, Clojure/Java prints the expected and actual values, where the actual value includes a stack trace for the exception thrown. This is useful information for developers to isolate the reason for the exception being thrown during the failed test.

ClojureScript 1.10.520 prints the actual value as the exception object, e.g. like so: `#object[Error Error: my custom exception #2]`, but never prints a stack trace.

A tiny sample project demonstrating the difference in behavior between Clojure/Java and ClojureScript can be found here: https://github.com/jafingerhut/cljs-3162-sample-project

Environment

None

Attachments

1
  • 30 Aug 2019, 08:13 AM

Activity

Show:

Andy FingerhutAugust 30, 2019 at 8:14 AM

As stated in commit comments and implied by the file name, the attached patch cljs-3162-wip.patch is an incomplete work in progress, and I do not know if I will find the time to learn how to complete it properly. Hopefully someone beats me to it.

Details

Assignee

Reporter

Affects versions

Priority

Created August 30, 2019 at 7:20 AM
Updated August 30, 2019 at 8:14 AM