Skip to content

Commit 4cef483

Browse files
committed
Fix a couple of broken tests
1 parent ca08ea4 commit 4cef483

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

src/cider/nrepl/middleware/stacktrace.clj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,9 @@
291291
:message "Spec assertion failed."
292292
:spec (prepare-spec-data data pprint-fn print-options))
293293
(-> m
294-
(assoc :data (pprint-fn data print-options))
294+
(assoc :data (if (not-empty print-options)
295+
(pprint-fn data print-options)
296+
(pprint-fn data)))
295297
(assoc :location
296298
(select-keys data [:clojure.error/line :clojure.error/column
297299
:clojure.error/phase :clojure.error/source

test/clj/cider/nrepl/middleware/stacktrace_test.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@
172172
:clojure.error/source "/foo/bar/baz.clj"
173173
:clojure.error/phase :macroexpand
174174
:clojure.error/symbol 'clojure.core/let})
175-
cause (analyze-cause e identity)]
175+
cause (analyze-cause e identity {})]
176176
(is (= {:clojure.error/line 1
177177
:clojure.error/column 42
178178
:clojure.error/source "/foo/bar/baz.clj"

test/spec/cider/nrepl/middleware/stacktrace_spec_test.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(:require
33
[cider.nrepl.middleware.stacktrace :refer :all]
44
[clojure.spec.alpha :as s]
5-
[clojure.pprint :refer [pprint]]
5+
[cider.nrepl.pprint :refer [pprint]]
66
[clojure.test :refer :all]))
77

88
(s/check-asserts true)
@@ -13,7 +13,8 @@
1313
(try (eval form)
1414
(catch Exception e
1515
e))
16-
pprint))
16+
pprint
17+
{}))
1718

1819
(defn stack-frames
1920
[form]

0 commit comments

Comments
 (0)