                   :as test
                   :include-macros true
                   :refer [test-var]
-                  :refer-macros [is]]
+                  :refer-macros [is deftest testing]]
                  [cljs.reader :refer [read-string]]])
             #?(:clj
                [clojure.test :as test :refer :all])

    (let [[a b & more] (-> shrunk first ::ct/params first)]
      (is (empty? more))
      (is (and a b (= a b))))))


(defspec this-is-supposed-to-fail 100 vector-elements-are-unique)

(deftest can-report-shrinking
  (binding [ct/*report-shrinking* true]
    (let [{:keys [report-counters test-out]} (capture-test-var #'this-is-supposed-to-fail)]
      (is (== 1 (:fail report-counters)))
      (is (re-seq #?(:clj (java.util.regex.Pattern/compile
                            "(?s)Shrinking vector-elements-are-unique starting with parameters \\[\\[.+")
                     :cljs #"Shrinking vector-elements-are-unique starting with parameters \[\[[\s\S]+")
                  test-out)))))

(deftest tcheck-118-pass-shrunk-input-on-to-clojure-test
  (let [{trial ::ct/trial, shrinking ::ct/shrinking, shrunk ::ct/shrunk}
        (group-by :type (:reports (capture-test-var #'this-is-supposed-to-fail)))]
    ;; should have had some successful runs because the initial size
    ;; is too small for duplicates
    (is (seq trial))
