We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 66d7ee6 commit 1b5bc33Copy full SHA for 1b5bc33
test/haystack/parser/util_test.clj
@@ -0,0 +1,11 @@
1
+(ns haystack.parser.util-test
2
+ (:require
3
+ [clojure.test :refer [deftest is]]
4
+ [haystack.parser.util :as util]))
5
+
6
+(deftest safe-read-edn-test
7
+ (is (= nil (util/safe-read-edn "[")))
8
+ (is (= [1 2 3] (util/safe-read-edn "[1 2 3]")))
9
+ (let [{:keys [form tag]} (util/safe-read-edn "#error {:a 1}")]
10
+ (is (= 'error tag))
11
+ (is (= {:a 1} form))))
0 commit comments