Fork me on GitHub
#test-check
<
2020-07-20
>
plexus07:07:01

WARNING: Use of undeclared Var goog.math.Long/fromBits at line 64 file:/home/arne/.m2/repository/org/clojure/test.check/1.1.0/test.check-1.1.0.jar!/clojure/test/check/random/longs.cljs
WARNING: Use of undeclared Var goog.math.Long/fromString at line 77 file:/home/arne/.m2/repository/org/clojure/test.check/1.1.0/test.check-1.1.0.jar!/clojure/test/check/random/longs.cljs                                                                                                                                    
WARNING: Use of undeclared Var goog.math.Long/fromNumber at line 81 file:/home/arne/.m2/repository/org/clojure/test.check/1.1.0/test.check-1.1.0.jar!/clojure/test/check/random/longs.cljs                                                                                                                                    
WARNING: Use of undeclared Var goog.math.Long/fromNumber at line 87 file:/home/arne/.m2/repository/org/clojure/test.check/1.1.0/test.check-1.1.0.jar!/clojure/test/check/random/longs.cljs
WARNING: Use of undeclared Var goog.math.Long/getOne at line 92 file:/home/arne/.m2/repository/org/clojure/test.check/1.1.0/test.check-1.1.0.jar!/clojure/test/check/random/longs.cljs
WARNING: cljs.core/<=, all arguments must be numbers, got [#{nil js/Number} number] instead at line 1193 file:/home/arne/.m2/repository/org/clojure/test.check/1.1.0/test.check-1.1.0.jar!/clojure/test/check/generators.cljc
I'm seeing these warnings when using test.check from ClojureScript. Not sure what's causing them, can't immediately see fault with the code.

plexus07:07:33

did some googling but only found this, which does seem to show at least one other person ran into this 🙂 https://github.com/AdamFrey/cljs-test-check-warning-example

Filipe Silva13:07:27

how are people using test.check with async code?

Filipe Silva13:07:57

is there any pretty obvious way to do it?

gfredericks13:07:00

Huh. Does that work? I don't remember it 🙃

gfredericks13:07:10

In any case there's nothing more official than that

Filipe Silva13:07:54

ok, now I know

Filipe Silva13:07:19

I was asking because @wilkerlucio actually did something similar to what you did, but with core.async channels

Filipe Silva13:07:14

wilker and I were using it for test at http://roamresearch.com but now needed to extract it away from the official test.check

Filipe Silva13:07:33

so I was wondering if there was something around already that we should be using

gfredericks13:07:22

It's possible there are other libraries. But I'd say this is the most severe hole in test.check at the moment. That POC could be usable if the cljs.test details are worked out, and if it doesn't hurt perf for synchronous jvm use

Filipe Silva13:07:52

what are the cljs.test details?

gfredericks13:07:30

just "how should this be used from cljs.test?"; ideally it'd be similar or same as on the jvm e.g., can defspec work?

Filipe Silva13:07:37

I was kinda focused on cljs so that didn't really come to mind

Filipe Silva13:07:56

there I'd just use an async deftest

gfredericks13:07:16

It might be easy. I just didn't know much about cljs testing when I made that commit

Filipe Silva13:07:37

ok, will think about it some

Filipe Silva13:07:43

thank you for the insight on this

👍 3