Skip to content

Commit

Permalink
Reproduce issue in test
Browse files Browse the repository at this point in the history
  • Loading branch information
zampino committed Jan 9, 2024
1 parent cc5cf40 commit 6999b5a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion test/nextjournal/clerk/eval_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,14 @@
(eval/eval-string "{:a (range)}"))))

(testing "can handle failing hash computation for deref-dep"
(eval/eval-string "(ns test-deref-hash (:require [nextjournal.clerk :as clerk])) (defonce !state (atom [(clerk/md \"_hi_\")])) @!state")))
(eval/eval-string "(ns test-deref-hash (:require [nextjournal.clerk :as clerk])) (defonce !state (atom [(clerk/md \"_hi_\")])) @!state"))

(testing "won't eval forward declarations"
(is (thrown? Exception
(eval/eval-string "(ns test-forward-declarations {:nextjournal.clerk/no-cache true})
(declare delayed-def)
(inc delayed-def)
(def delayed-def 123)")))))

(defn eval+extract-doc-blocks [code-str]
(-> code-str
Expand Down

0 comments on commit 6999b5a

Please sign in to comment.