Function: cider-test-render-summary

cider-test-render-summary is a byte-compiled function defined in cider-test.el.

Signature

(cider-test-render-summary BUFFER SUMMARY &optional ELAPSED-TIME)

Documentation

Emit into BUFFER the report SUMMARY statistics.

If ELAPSED-TIME is provided it will be included in the summary.

Source Code

;; Defined in ~/.emacs.d/elpa/cider-20260414.1619/cider-test.el
(defun cider-test-render-summary (buffer summary &optional elapsed-time)
  "Emit into BUFFER the report SUMMARY statistics.

If ELAPSED-TIME is provided it will be included in the summary."
  (with-current-buffer buffer
    (nrepl-dbind-response summary (ns var test pass fail error)
      (let ((ms (nrepl-dict-get elapsed-time "ms")))
        (insert (format "Tested %d namespaces%s\n" ns (if ms
                                                          (format " in %s ms" ms)
                                                        ""))))
      (insert (format "Ran %d assertions, in %d test functions\n" test var))
      (unless (zerop fail)
        (cider-insert (format "%d failures" fail) 'cider-test-failure-face t))
      (unless (zerop error)
        (cider-insert (format "%d errors" error) 'cider-test-error-face t))
      (when (zerop (+ fail error))
        (cider-insert (format "%d passed" pass) 'cider-test-success-face t))
      (when cider-test-fail-fast
        (cider-insert "cider-test-fail-fast: " 'font-lock-comment-face nil)
        (cider-insert "t" 'font-lock-constant-face t))
      (insert "\n\n"))))