Clojurians
#cljs-dev
<
2019-02-12
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

richiardiandrea03:02:55

I have a weird error:

/home/arichiardi/git/laputa/policy-fn/.cljs/gen-test.js:51321
      throw Error("Require clojure.test.check before calling check.");
      ^

Error: Require clojure.test.check before calling check.
    at /home/arichiardi/git/laputa/policy-fn/.cljs/gen-test.js:51321:13
    at Function.laputa.policy.generative._main.cljs$core$IFn$_invoke$arity$variadic (/home/arichiardi/git/laputa/policy-fn/.cljs/gen-test.js:51335:4)
    at laputa.policy.generative._main (/home/arichiardi/git/laputa/policy-fn/.cljs/gen-test.js:51116:41)
    at Object.cljs.core.apply_to (/home/arichiardi/git/laputa/policy-fn/.cljs/gen-test.js:10996:84)
    at Function.cljs.core.apply.cljs$core$IFn$_invoke$arity$2 (/home/arichiardi/git/laputa/policy-fn/.cljs/gen-test.js:11250:42)
    at /home/arichiardi/git/laputa/policy-fn/.cljs/gen-test.js:51344:17
    at Object.<anonymous> (/home/arichiardi/git/laputa/policy-fn/.cljs/gen-test.js:51346:3)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)

richiardiandrea03:02:07

but I am requiring the namespace

richiardiandrea03:02:15

all good in 1.10.439

richiardiandrea03:02:10

as a data point, the call to check! is done via a macro if it can be helpful for debugging, but my generative tests are now all emitting that warning

borkdude07:02:16

@richiardiandrea You need to require both [clojure.test.check] and [clojure.test.check.properties]. The error message is a bit misleading and I tried to correct the ClojureScript site for this already (https://github.com/clojure/clojurescript-site/pull/300). I hope this can be merged soon (cc @dnolen and @alexmiller)

richiardiandrea15:02:14

Oh great thank you

borkdude07:02:11

@richiardiandrea This JIRA corrects the error message in CLJS: https://dev.clojure.org/jira/browse/CLJS-3048