From cf43487c6c0c855d550743ef62ce0c6578ec5d95 Mon Sep 17 00:00:00 2001 From: Erwin Rooijakkers Date: Wed, 23 Mar 2022 17:24:11 +0100 Subject: [PATCH] Add ChunkedSeq to protocol Fixes https://github.com/Vincit/venia/issues/46 --- src/venia/core.cljc | 2 ++ test/venia/core_test.cljc | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/venia/core.cljc b/src/venia/core.cljc index 9d0bb92..a092546 100644 --- a/src/venia/core.cljc +++ b/src/venia/core.cljc @@ -50,6 +50,8 @@ (arg->str [arg] (str "{" (arguments->str arg) "}")) PersistentVector (arg->str [arg] (sequential->str arg)) + ChunkedSeq + (arg->str [arg] (sequential->str arg)) IndexedSeq (arg->str [arg] (sequential->str arg)) LazySeq diff --git a/test/venia/core_test.cljc b/test/venia/core_test.cljc index 5e3dda7..ab57da6 100644 --- a/test/venia/core_test.cljc +++ b/test/venia/core_test.cljc @@ -26,6 +26,9 @@ (set))))) ;; List in cljs (is (= "[1,2,3]" (v/arg->str '(1 2 3)))) + ;; ChunkedSeq in cljs + (is (= "[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39]" + (q/arg->str (seq (vec (range 40)))))) ;; IndexedSeq in cljs (is (= "[1,2,3]" (v/arg->str (seq [1 2 3])))) ;; LazySeq in cljs