diff --git a/src/orchard/meta.clj b/src/orchard/meta.clj index 8e86495b..00e86ecf 100644 --- a/src/orchard/meta.clj +++ b/src/orchard/meta.clj @@ -172,8 +172,9 @@ maybe-add-file maybe-add-url (update :ns ns-name))] - (maybe-add-spec v meta-map) - (maybe-add-see-also v meta-map))))) + (->> meta-map + (maybe-add-spec v) + (maybe-add-see-also v)))))) (defn meta+ "Return special form or var's meta." diff --git a/test/orchard/meta_test.clj b/test/orchard/meta_test.clj index ba74c60d..0e3a54fe 100644 --- a/test/orchard/meta_test.clj +++ b/test/orchard/meta_test.clj @@ -78,6 +78,11 @@ (deftest var-meta-test ;; Test files can't be found on the class path. (is (:file (m/var-meta #'m/var-meta))) + (testing "Includes spec information" + (is (or (contains? (m/var-meta (resolve 'let)) :spec) + (nil? (resolve 'clojure.spec.alpha/spec))))) + (testing "Includes see-also information from clojure docs" + (is (contains? (m/var-meta (resolve 'clojure.set/union)) :see-also))) (is (re-find #"string\.clj" (:file (#'m/maybe-add-file {:ns (find-ns 'clojure.string)}))))