Skip to content

Commit

Permalink
Add regression test for stable hashes in presentations
Browse files Browse the repository at this point in the history
  • Loading branch information
mk committed Aug 28, 2023
1 parent 0846e10 commit f6d9d89
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/nextjournal/clerk/viewer_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,11 @@
:out-path builder/default-out-path} test-doc)
#"_data/.+\.png")))))

(testing "presentations are pure, result hashes are stable"
(let [test-doc (eval/eval-string "(range 100)")]
(is (= (view/doc->viewer {} test-doc)
(view/doc->viewer {} test-doc)))))

(testing "Setting custom options on results via metadata"
(is (= :full
(-> (eval/eval-string "^{:nextjournal.clerk/width :full} (nextjournal.clerk/html [:div])")
Expand Down

0 comments on commit f6d9d89

Please sign in to comment.