Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
tiensonqin committed Jun 26, 2024
1 parent d23b959 commit 18a9b14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 4 additions & 0 deletions deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@
com.cognitect/transit-clj {:mvn/version "1.0.324"}
com.cognitect/transit-cljs {:mvn/version "0.8.269"}}}

:shadow-cljs
{:extra-deps {thheller/shadow-cljs {:mvn/version "2.19.0"}}
:main-opts ["-m" "shadow.cljs.devtools.cli"]}

:bench
{:extra-paths ["bench"]
:jvm-opts ["-server"
Expand Down
6 changes: 2 additions & 4 deletions test/datascript/test/storage.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -280,17 +280,15 @@

;; overflow keeps working on restored conn
(d/transact! conn' (mapv #(vector :db/add % :name (str %)) (range 36 80)))
;; (is (= 28 (count @(:*writes storage))))
;; FIXME: clj version is 28
(is (= 29 (count @(:*writes storage))))
(is (= 28 (count @(:*writes storage))))
(is (= @#'storage/tail-addr (last @(:*writes storage))))

;; restore conn without tail
(let [conn'' (d/restore-conn storage)]
(is (= @conn' @conn''))

(d/transact! conn'' [[:db/add 80 :name "Ilya"]])
(is (= 30 (count @(:*writes storage))))
(is (= 29 (count @(:*writes storage))))
(is (= @#'storage/tail-addr (last @(:*writes storage))))

;; gc on conn
Expand Down

0 comments on commit 18a9b14

Please sign in to comment.