Alright! I haven't done that before but here it is: 
http://dev.clojure.org/jira/browse/TCHECK-61

On Wednesday, March 18, 2015 at 5:52:27 PM UTC+1, David Nolen wrote:
> File an issue in test.check JIRA with all of this information.
> 
> 
> Thanks,
> David
> 
> 
> On Wed, Mar 18, 2015 at 12:12 PM, Viktor Eriksson <[email protected]> 
> wrote:
> Hi,
> 
> 
> 
> I have the following issue:
> 
> 
> 
> I tried to integrate test.check into my current cljs.test setup. The 
> generators are working like a charm but I have issues with the defspec macro. 
> I get the an error when trying the example from: 
> https://github.com/clojure/test.check#cljstest-integration
> 
> 
> 
> (defspec first-element-is-min-after-sorting ;; the name of the test
> 
>          100 ;; the number of iterations for test.check to test
> 
>          (prop/for-all [v (gen/not-empty (gen/vector gen/int))]
> 
>                        (= (apply min v)
> 
>                           (first (sort v)))))
> 
> 
> 
> The error is the following:
> 
> 
> 
> ERROR in (first-element-is-min-after-sorting) (TypeError:NaN)
> 
> Uncaught exception, not in assertion.
> 
> expected: nil
> 
>   actual:
> 
> #<TypeError: 'undefined' is not an object (evaluating 
> 'f.cljs$lang$maxFixedArity')>
> 
> 
> 
> I saw that there is a function called for-all* as well and tried it but it 
> didn't work either, but I got a different error:
> 
> 
> 
> ERROR in (first-element-is-min-after-sorting) (Error:NaN)
> 
> Uncaught exception, not in assertion.
> 
> expected: nil
> 
>   actual:
> 
> #<Error: Assert failed: Args to tuple must be generators
> 
> (every? generator? generators)>
> 
> 
> 
> Any ideas what the issue might be? Anyone that successfully ran test.check in 
> cljs with defspec?
> 
> 
> 
> The tests are run with phantomjs using this example: 
> https://gitlab.com/keeds/cljsinit and my ns requires the following:
> 
> 
> 
> [cljs.test.check.generators :as gen]
> 
> [cljs.test.check.cljs-test :as ct :refer-macros [defspec]]
> 
> [cljs.test.check.properties :as prop :include-macros true]
> 
> [cljs.test :as test :refer-macros [deftest testing is use-fixtures]]
> 
> 
> 
> versions:
> 
> [org.clojure/test.check "0.7.0"]
> 
> [org.clojure/clojurescript "0.0-2843"]
> 
> 
> 
> --
> 
> Note that posts from new members are moderated - please be patient with your 
> first post.
> 
> ---
> 
> You received this message because you are subscribed to the Google Groups 
> "ClojureScript" group.
> 
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> 
> To post to this group, send email to [email protected].
> 
> Visit this group at http://groups.google.com/group/clojurescript.

-- 
Note that posts from new members are moderated - please be patient with your 
first post.
--- 
You received this message because you are subscribed to the Google Groups 
"ClojureScript" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/clojurescript.

Reply via email to