test-check

plexus 2020-07-20T07:45:01.097400Z

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.

plexus 2020-07-20T07:45:33.097900Z

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 Silva 2020-07-20T13:39:24.098400Z

heya all

Filipe Silva 2020-07-20T13:40:27.099100Z

how are people using test.check with async code?

Filipe Silva 2020-07-20T13:41:57.099500Z

is there any pretty obvious way to do it?

2020-07-20T13:43:00.100500Z

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

2020-07-20T13:43:10.100900Z

In any case there's nothing more official than that

Filipe Silva 2020-07-20T13:43:54.101400Z

ok, now I know

Filipe Silva 2020-07-20T13:44:19.101900Z

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

Filipe Silva 2020-07-20T13:45:14.103Z

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 Silva 2020-07-20T13:45:33.103400Z

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

2020-07-20T13:47:22.105500Z

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 Silva 2020-07-20T13:48:52.105800Z

what are the cljs.test details?

2020-07-20T13:52:30.106500Z

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 Silva 2020-07-20T13:53:21.106700Z

hm I see...

Filipe Silva 2020-07-20T13:53:37.107100Z

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

Filipe Silva 2020-07-20T13:53:56.107300Z

there I'd just use an async deftest

2020-07-20T13:56:16.108Z

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

Filipe Silva 2020-07-20T13:56:37.108200Z

ok, will think about it some

Filipe Silva 2020-07-20T13:56:43.108500Z

thank you for the insight on this

1👍