Skip to content

Commit 98f2baa

Browse files
author
Jeff Hui
committed
Update test-report buffer when tests pass
If the user has the test-report buffer open. Update the buffer to show the tests pass instead of keeping previously failed errors. This is less confusing than seeing previously failed errors despite tests passing.
1 parent 9118518 commit 98f2baa

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
### New features
66

7+
* When tests pass after previously failing, update the test-report buffer to show success.
78
* [#1373](https://github.com/clojure-emacs/cider/issues/1373): Add gradle support for `cider-jack-in`.
89
* Indentation of macros (and functions) [can be specified](https://github.com/clojure-emacs/cider#specifying-indentation) in the var's metadata, via [indent specs](Indent-Spec.md).
910
* [Abbreviated printing](https://github.com/clojure-emacs/cider-nrepl/pull/268) for functions multimethods. Instead of seeing `#object[clojure.core$_PLUS_ 0x4e648e99 "clojure.core$_PLUS_@4e648e99"]` you'll see `#function[clojure.core/+]`.

cider-test.el

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -450,12 +450,16 @@ displayed. When test failures/errors occur, their sources are highlighted."
450450
(setq cider-test-last-results results)
451451
(cider-test-highlight-problems ns results)
452452
(cider-test-echo-summary summary)
453-
(when (or (not (zerop (+ error fail)))
454-
cider-test-show-report-on-success)
455-
(cider-test-render-report
456-
(cider-popup-buffer cider-test-report-buffer
457-
cider-auto-select-test-report-buffer)
458-
ns summary results)))))))))
453+
(if (or (not (zerop (+ error fail)))
454+
cider-test-show-report-on-success)
455+
(cider-test-render-report
456+
(cider-popup-buffer cider-test-report-buffer
457+
cider-auto-select-test-report-buffer)
458+
ns summary results)
459+
(when (get-buffer cider-test-report-buffer)
460+
(cider-test-render-report
461+
(cider-popup-buffer cider-test-report-buffer)
462+
ns summary results))))))))))
459463

460464
(defun cider-test-rerun-tests ()
461465
"Rerun failed and erring tests from the last tested namespace."

0 commit comments

Comments
 (0)