Skip to content

Commit

Permalink
Fix bug with ds/or spec generation
Browse files Browse the repository at this point in the history
  • Loading branch information
dehli committed Nov 13, 2021
1 parent d05e6e3 commit dc4990d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/cljc/spec_tools/data_spec_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -302,3 +302,13 @@
(testing "nested maps have a name"
(let [spec (st/get-spec :spec-tools.data-spec-test$named3/map)]
(is (and spec (:name spec)))))))

(def issue-264-spec
(ds/spec {:name ::issue-264
:spec {:map (ds/or {:map1 {:kw1 keyword?}
:map2 {:kw2 keyword?}})}}))

(deftest issue-264
(testing "doesn't strip nested keys"
(is (= {:map {:kw1 :foo}}
(st/select-spec issue-264-spec {:map {:kw1 :foo}})))))

0 comments on commit dc4990d

Please sign in to comment.