Skip to content

Commit

Permalink
parse test
Browse files Browse the repository at this point in the history
  • Loading branch information
frenchy64 committed Aug 16, 2024
1 parent 2e752c0 commit 04c3608
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions test/malli/distributive_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,16 @@
[2 [:multi {:dispatch :z}
[3 [:map [:y [:= 2]] [:z [:= 3]]]]
[4 [:map [:y [:= 2]] [:z [:= 4]]]]]]])))

(deftest parse-distributive-multi-test
(is (= [1 [3 {:y 1, :z 3}]]
(m/parse
[:merge
[:multi {:dispatch :y}
[1 [:map [:y [:= 1]]]]
[2 [:map [:y [:= 2]]]]]
[:multi {:dispatch :z}
[3 [:map [:z [:= 3]]]]
[4 [:map [:z [:= 4]]]]]]
{:y 1 :z 3}
options))))

0 comments on commit 04c3608

Please sign in to comment.