Skip to content

Commit

Permalink
Merge pull request #1098 from metosin/fix/flaky-test
Browse files Browse the repository at this point in the history
test: try to make map-of-min-max-test less flaky by fixing seed
  • Loading branch information
ikitommi authored Aug 28, 2024
2 parents 130be2a + a0f4402 commit 41f33c9
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/malli/generator_test.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1045,13 +1045,16 @@
(deftest map-of-min-max-test
(is (empty? (remove #(<= 2 (count %))
(mg/sample [:map-of {:min 2} [:enum 1 2 3] :any]
{:size 100}))))
{:size 100
:seed 3}))))
(is (empty? (remove #(<= (count %) 2)
(mg/sample [:map-of {:max 2} [:enum 1 2 3] :any]
{:size 100}))))
{:size 100
:seed 3}))))
(is (empty? (remove #(<= 2 (count %) 3)
(mg/sample [:map-of {:min 2 :max 3} [:enum 1 2 3] :any]
{:size 100})))))
{:size 100
:seed 3})))))

(deftest such-that-generator-failure-test
(is (thrown-with-msg?
Expand Down

0 comments on commit 41f33c9

Please sign in to comment.