mirror of
https://github.com/penpot/penpot.git
synced 2025-06-05 08:11:39 +02:00
✨ Add better error reporting for test check tests
This commit is contained in:
parent
fac93e4ff8
commit
be9e3fa355
1 changed files with 6 additions and 8 deletions
|
@ -56,13 +56,8 @@
|
||||||
(str "(pass=TRUE, tests=" (:num-tests params) ", seed=" (:seed params) ", elapsed=" time "ms)"))))
|
(str "(pass=TRUE, tests=" (:num-tests params) ", seed=" (:seed params) ", elapsed=" time "ms)"))))
|
||||||
|
|
||||||
(defmethod ct/report #?(:clj ::thrunk :cljs [:cljs.test/default ::thrunk])
|
(defmethod ct/report #?(:clj ::thrunk :cljs [:cljs.test/default ::thrunk])
|
||||||
[{:keys [::params] :as m}]
|
[_]
|
||||||
(let [smallest (-> params :shrunk :smallest vec)]
|
nil)
|
||||||
(println)
|
|
||||||
(println "Condition failed with the following params:")
|
|
||||||
(println "Seed:" (:seed params))
|
|
||||||
(println)
|
|
||||||
(pp/pprint smallest)))
|
|
||||||
|
|
||||||
(defmethod ct/report #?(:clj ::trial :cljs [:cljs.test/default ::trial])
|
(defmethod ct/report #?(:clj ::trial :cljs [:cljs.test/default ::trial])
|
||||||
[_]
|
[_]
|
||||||
|
@ -76,9 +71,12 @@
|
||||||
(let [tvar (get-testing-var)
|
(let [tvar (get-testing-var)
|
||||||
tsym (get-testing-sym tvar)
|
tsym (get-testing-sym tvar)
|
||||||
res (:result params)]
|
res (:result params)]
|
||||||
(println)
|
|
||||||
|
(println "---------------------------------------------------------")
|
||||||
(println "Generative test:" (str "'" tsym "'")
|
(println "Generative test:" (str "'" tsym "'")
|
||||||
(str "(pass=FALSE, tests=" (:num-tests params) ", seed=" (:seed params) ")"))
|
(str "(pass=FALSE, tests=" (:num-tests params) ", seed=" (:seed params) ")"))
|
||||||
|
(pp/pprint (:fail params))
|
||||||
|
(println "---------------------------------------------------------")
|
||||||
|
|
||||||
(when (ex/exception? res)
|
(when (ex/exception? res)
|
||||||
#?(:clj (ex/print-throwable res)
|
#?(:clj (ex/print-throwable res)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue