Skip to content

Instantly share code, notes, and snippets.

@dpsutton
Created February 7, 2021 20:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dpsutton/763aea2bfbc9440f7f918bc342a79727 to your computer and use it in GitHub Desktop.
Save dpsutton/763aea2bfbc9440f7f918bc342a79727 to your computer and use it in GitHub Desktop.
;; shadow-cljs.edn: {:dependencies [[org.clojure/test.check "1.1.0"]]}
;; npm i shadow-cljs
;; cider-jack-in-cljs
;; shadow
;; node-repl
foo> (require '[clojure.spec.test.alpha :as spec])
nil
foo> (spec/check)
Execution error (Error) at (<cljs repl>:1).
Require clojure.test.check and clojure.test.check.properties before calling check.
nil
foo> (require 'clojure.test.check 'clojure.test.check.properties)
nil
foo> (spec/check)
Execution error (Error) at (<cljs repl>:1).
Require clojure.test.check and clojure.test.check.properties before calling check.
nil
foo> (require 'cljs.test.check 'clojure.test.check.properties)
------ REPL Error while processing ---------------------------------------------
(require 'cljs.test.check 'clojure.test.check.properties)
The required namespace "cljs.test.check" is not available, it was required by "foo.cljs".
nil
foo> (dir clojure.test.check.properties)
->ErrorResult
ErrorResult
for-all
for-all*
map->ErrorResult
nil
foo> (dir clojure.test.check)
quick-check
nil
foo> (apropos "for-all")
(cljs.spec.gen.alpha/for-all*
clojure.test.check.properties/for-all
clojure.test.check.properties/for-all*)
foo> (clojure.test.check/quick-check 10 (clojure.test.check.properties/for-all
[a clojure.test.check.generators/nat]
(> (* a a) a)))
{:shrunk
{:total-nodes-visited 0,
:depth 0,
:pass? false,
:result false,
:result-data nil,
:time-shrinking-ms 1,
:smallest [0]},
:failed-after-ms 0,
:num-tests 1,
:seed 1612728233572,
:fail [0],
:result false,
:result-data nil,
:failing-size 0,
:pass? false}
foo> (spec/check)
Execution error (Error) at (<cljs repl>:1).
Require clojure.test.check and clojure.test.check.properties before calling check.
nil
foo>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment