Skip to content

Commit 9a68234

Browse files
committed
CLJS-1213: cljs.analyzer incorrectly marks all defs as tests when eliding test metadata
fix the cond-> to actually check for :test presence.
1 parent a9474ea commit 9a68234

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/clj/cljs/analyzer.clj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -856,9 +856,10 @@
856856
(swap! env/*compiler* assoc-in [::namespaces ns-name :defs sym]
857857
(merge
858858
{:name var-name}
859-
;; elide test metadata, as it includes non-valid EDN - David
859+
;; remove actual test metadata, as it includes non-valid EDN and
860+
;; cannot be present in analysis cached to disk - David
860861
(cond-> sym-meta
861-
:test (-> (dissoc :test) (assoc :test true)))
862+
(:test sym-meta) (assoc :test true))
862863
{:meta (-> sym-meta
863864
(dissoc :test)
864865
(update-in [:file]

0 commit comments

Comments
 (0)