Hello, I use spec for testing and as soon as I add this to my code: (stest/summarize-results (stest/check
paintings2.api-get/get-data-detail-page))`
then the proto-repl will not boot up properly.
I have disabled all the refresh part in the settings already
Anyone a idea how to make this work
@roelof wrap it in a function definition and call the function when you need to. proto-repl will reload all your code on connecting, which means it’ll run any top-level forms that Do Things
@robert-stuttaford oke, so I cannot place only the (stest .... )
part
I have to make some sort of function of it so put the (stest )
into a (def ..... )
into a defn
, yes
Thanks, It worked . When I do
(defn test-functions
"all the test"
[]
(stest/summarize-results (stest/check 'paintings2.api-get/get-objectNumbers))
(stest/summarize-results (stest/check 'paintings2.api-get/get-art-object))
(stest/summarize-results (stest/check 'paintings2.api-get/get-data-detail-page))
(stest/summarize-results (stest/check 'paintings2.api-get/get-data-front-page))
(stest/summarize-results (stest/check `paintings2.api-get/get-image-url))
(stest/summarize-results (stest/check `paintings2.api-get/get-data-front-page-url))
(stest/summarize-results (stest/check `paintings2.api-get/get-data-detail-page)))
I see this :
{:sym paintings2.api-get/get-objectNumbers}
{:sym paintings2.api-get/get-art-object}
{:sym paintings2.api-get/get-data-detail-page}
{:sym paintings2.api-get/get-data-front-page}
{:sym paintings2.api-get/get-image-url}
{:sym paintings2.api-get/get-data-detail-page}
paintings2.api-get=>
{:check-passed 1, :total 1}
so im happy now
Thanks a lot
sure thing
@roelof check
can test all your speced functions when called with no arguments so you can even avoid all those check calls 😉
@carocad oke, so I have to do (stest/checks)
?
(stest/summarize-results (stest/check))
should do the job
oke, then I understand you well
thanks
@carocad it;s not working. I see only this output
{:sym paintings2.api-get/get-objectNumbers}
{:sym paintings2.api-get/get-data-detail-page}
and then a spec is failing
This needs more investigations , Also with the old code things are failing where this morning everything works well
try checkable-syms: https://clojure.github.io/clojure/branch-master/clojure.spec-api.html#clojure.spec.test/checkable-syms
it should show you if the error is on your side
oke, I think I found something , I will ask in the beginners channel for help
@carocad thanks