cljs.spec.test.alpha/summarize-results

functionpreviously cljs.spec.test/summarize-results clojure.spec.test.alpha/summarize-resultsEdit
(summarize-results check-results)
(summarize-results check-results summary-result)

Source docstring:
Given a collection of check-results, e.g. from 'check', pretty
prints the summary-result (default abbrev-result) of each.

Returns a map with :total, the total number of results, plus a
key with a count for each different :type of result.
Source code @ clojurescript:src/main/cljs/cljs/spec/test/alpha.cljs
(defn summarize-results
  ([check-results] (summarize-results check-results abbrev-result))
  ([check-results summary-result]
   (reduce
     (fn [summary result]
       (pp/pprint (summary-result result))
       (-> summary
         (update :total inc)
         (update (result-type result) (fnil inc 0))))
     {:total 0}
     check-results)))