Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion bb.edn
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{:min-bb-version "0.4.0"
{:min-bb-version "1.12.210"
:paths ["bb"]
:tasks
{test-jvm {:doc "Runs JVM tests"
Expand Down
11 changes: 3 additions & 8 deletions test/clojure/core_test/dissoc.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,11 @@

(testing "records"
(let [r (TestDissocRecord. 1 2 nil)]
(are [expected keys] #?(; bb preserves the record type even if a basis fields is dissociated
; https://github.com/babashka/babashka/issues/1886
:bb (= expected (into {} (apply dissoc r keys)))
; other implementations return a map
:default (= expected (apply dissoc r keys)))
(are [expected keys] (= expected (apply dissoc r keys))
{:b 2 :c nil} [:a]
{:b 2 :c nil} [:a :d]
{} [:a :b :c])
; all implementations preserve the record type if no basis field is dissociated
(is (= r (dissoc r :d)))))
{} [:a :b :c]
r [:d])))

(testing "bad shape"
(are [m keys] (thrown? #?(:cljs js/Error :default Exception) (apply dissoc m keys))
Expand Down