Skip to content

Commit 6c71007

Browse files
committed
Observe cider-stacktrace-print-level for test errors.
Pass the `cider-stacktrace-print-level` defcustom added in 2142ee5 when viewing stacktraces for test errors. Also, change `if` to a `when` to clarify intent.
1 parent 92efe5f commit 6c71007

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

cider-interaction.el

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,8 +1041,8 @@ They exist for compatibility with `next-error'."
10411041
(nrepl-send-request
10421042
(append
10431043
(list "op" "stacktrace" "session" session)
1044-
(if cider-stacktrace-print-level
1045-
(list "print-level" cider-stacktrace-print-level)))
1044+
(when cider-stacktrace-print-level
1045+
(list "print-level" cider-stacktrace-print-level)))
10461046
(lambda (response)
10471047
(nrepl-dbind-response response (class status)
10481048
(cond (class (setq causes (cons response causes)))

cider-test.el

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,8 +172,11 @@
172172
"Display stacktrace for the erring NS VAR test with the assertion INDEX."
173173
(let (causes)
174174
(nrepl-send-request
175-
(list "op" "test-stacktrace" "session" (nrepl-current-session)
176-
"ns" ns "var" var "index" index)
175+
(append
176+
(list "op" "test-stacktrace" "session" (nrepl-current-session)
177+
"ns" ns "var" var "index" index)
178+
(when cider-stacktrace-print-level
179+
(list "print-level" cider-stacktrace-print-level)))
177180
(lambda (response)
178181
(nrepl-dbind-response response (class status)
179182
(cond (class (setq causes (cons response causes)))

0 commit comments

Comments
 (0)