gfredericks / test.chuck

A utility library for test.check
Eclipse Public License 1.0
214 stars 26 forks source link

`times` function not available in clojurescript #39

Closed sandhu closed 8 years ago

sandhu commented 8 years ago

The times function is not available in clojurescript. I'm happy to provide a PR to address that if there is no issue.

Thank you.

gfredericks commented 8 years ago

I think the whole point of the times function is that you can scale it via an env variable, which I assume doesn't apply in cljs (though maybe it does with node?); so for this to make sense we'd just need some form of configurability. I think even a dynamic var could help here (and could be useful in cljs as well), but maybe there's something specific to cljs as well?

sandhu commented 8 years ago

Even if it didn't support scaling in the cljs case, it would allow us to write unified test cases instead of having a conditional call to times in clj vs cljs.

I'll look into the configurability options in cljs and comment here.

gfredericks commented 8 years ago

yeah, I can see the portability advantages. If you want an earlier release that just makes it the identity function in cljs (and says so in the docstring), that sounds good to me.

sandhu commented 8 years ago

Sounds good. Will create a PR.