Fork me on GitHub
#test-check
<
2023-11-24
Caio Cascaes19:11:17

I've once seen this kind of assertion:

(is (= (-> response :body (json/read-str :key-fn keyword))
               [{:paper-quantity-standard 512
                 :nickname                "Galactic printer"
                 :brand                   "EPSON"
                 :prints-color?           true
                 :papers-quantity-photo   35
                 :prints-photo?           true
                 :public-id               logic.common/valid-uuid-str?
                 :model                   "GalaxyPrint 3000"}]))
That we could place a pure function to "nest" testing, such this part :public-id logic.common/valid-uuid-str? How can I achieve this? Which lib? Or whatever? (I'm not sure if it's (is (=... , maybe something with ...equals...)

hiredman19:11:09

test-check doesn't really use is

hiredman19:11:26

is is part of clojure.test

hiredman19:11:50

test-check is a generative testing library

Caio Cascaes21:11:11

Sorry, maybe wrong place to ask?

Caio Cascaes21:11:03

I'm moving this question to #C03S1KBA2 channel, soon I'm removing this from here.