From be9e3fa35587d71eb788658f1d91375fcfa884a4 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 28 Mar 2025 00:04:28 +0100 Subject: [PATCH] :sparkles: Add better error reporting for test check tests --- common/src/app/common/schema/test.cljc | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/common/src/app/common/schema/test.cljc b/common/src/app/common/schema/test.cljc index c3b38b0a2..ae44646fe 100644 --- a/common/src/app/common/schema/test.cljc +++ b/common/src/app/common/schema/test.cljc @@ -56,13 +56,8 @@ (str "(pass=TRUE, tests=" (:num-tests params) ", seed=" (:seed params) ", elapsed=" time "ms)")))) (defmethod ct/report #?(:clj ::thrunk :cljs [:cljs.test/default ::thrunk]) - [{:keys [::params] :as m}] - (let [smallest (-> params :shrunk :smallest vec)] - (println) - (println "Condition failed with the following params:") - (println "Seed:" (:seed params)) - (println) - (pp/pprint smallest))) + [_] + nil) (defmethod ct/report #?(:clj ::trial :cljs [:cljs.test/default ::trial]) [_] @@ -76,9 +71,12 @@ (let [tvar (get-testing-var) tsym (get-testing-sym tvar) res (:result params)] - (println) + + (println "---------------------------------------------------------") (println "Generative test:" (str "'" tsym "'") (str "(pass=FALSE, tests=" (:num-tests params) ", seed=" (:seed params) ")")) + (pp/pprint (:fail params)) + (println "---------------------------------------------------------") (when (ex/exception? res) #?(:clj (ex/print-throwable res)