test-check

2020-08-31T01:18:43.008800Z

AOT wouldn't reproduce it because AOT doesn't run code at compile time

2020-08-31T01:18:53.009100Z

I mean maybe it runs it but it only compiles the code, not the result

2020-08-31T01:19:33.009500Z

a fix would be something that lazy-initializes the global rng the first time you use it, I guess?

2020-08-31T01:20:23.009900Z

I don't think that's in a perf-sensitive codepath so I don't think there are any downsides

2020-08-31T01:21:00.010200Z

sounds like a legitimate jira ticket

Mitch 2020-08-31T18:44:46.015500Z

Are there resources available for testing async code in cljs via test.check? I see that there is an open ticket in jira for support, just wondering if there are any known workarounds that might allow me to still use defspec

2020-08-31T18:55:12.016300Z

Does the ticket reference a branch with a proof-of-concept?

Mitch 2020-08-31T19:35:29.017500Z

I don't think the ticket references it, but I have seen that branch. Haven't tried the branch out yet, though. I can give it a roll and share how it works for our use case if you think that would be helpful

2020-08-31T19:37:48.020Z

I was suggesting a "workaround" would be to just use that branch, if it works. Depends on your definition of workaround. I'm not sure there are any other options short of somebody completing integrating that feature. Coverting to async is a pretty fundamental change.

Mitch 2020-08-31T19:42:54.022300Z

Cool, thanks for helping me out. I really appreciate it. I'll see how that goes. I'm a little surprised that this seems to be a rare scenario 🤷

2020-08-31T19:45:57.022800Z

I, also, am surprised

2020-08-31T19:48:22.024Z

I haven't done much professional clojure web dev; maybe people tend to use frameworks where the user code is just functions on data, and so those user functions are amenable to synchronous testing?

Mitch 2020-08-31T19:58:34.026300Z

Yeah, I think that is a big part of it. Most of the time there is already a well-supported React component for whatever library you want to integrate, so you do not need to worry about testing its behavior

borkdude 2020-08-31T21:49:51.027100Z

@gfredericks > a fix would be something that lazy-initializes the global rng the first time you use it, I guess? https://gist.github.com/borkdude/768eb5d01085944190e5eb485fd4737a#workaround I'll make a JIRA ticket tomorrow

👍 1
👀 1