File tree Expand file tree Collapse file tree 7 files changed +45
-5
lines changed
.clj-kondo/com.github.seancorfield/expectations
hooks/com/github/seancorfield
resources/clj-kondo.exports/com.github.seancorfield/expectations
hooks/com/github/seancorfield
test/expectations/clojure Expand file tree Collapse file tree 7 files changed +45
-5
lines changed Original file line number Diff line number Diff line change 1- {:lint-as
1+ {:hooks
2+ {:analyze-call
3+ {expectations.clojure.test/more->
4+ hooks.com.github.seancorfield.expectations/more->}}
5+ :lint-as
26 {expectations.clojure.test/defexpect clojure.test/deftest
37 expectations.clojure.test/from-each clojure.core/for
4- expectations.clojure.test/more-of clj-kondo.lint-as/def-catch-all}}
8+ expectations.clojure.test/more-of clj-kondo.lint-as/def-catch-all
9+ expectations.clojure.test/=? clojure.core/=}}
Original file line number Diff line number Diff line change 1+ (ns hooks.com.github.seancorfield.expectations
2+ (:require [clj-kondo.hooks-api :as api]))
3+
4+ (defn more-> [{:keys [node]}]
5+ (let [tail (rest (:children node))
6+ rewritten
7+ (api/list-node
8+ (list*
9+ (api/token-node 'cond->)
10+ (api/token-node 'nil)
11+ tail))]
12+ {:node rewritten}))
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ Only accretive/fixative changes will be made from now on.
88
99* 2.0.next in progress
1010 * Fix [ #30 ] ( https://github.com/clojure-expectations/clojure-test/issues/30 ) by removing ` build-clj ` and using raw ` tools.build ` .
11+ * Address [ #29 ] ( https://github.com/clojure-expectations/clojure-test/issues/29 ) by providing a "hook" for ` more-> ` (but more work is needed).
1112 * Address [ #27 ] ( https://github.com/clojure-expectations/clojure-test/issues/27 ) by changing ` refer ` 'd note in stub macros' docstrings.
1213
1314* 2.0.160 -- 2022-03-26
Original file line number Diff line number Diff line change 1- {:lint-as
1+ {:hooks
2+ {:analyze-call
3+ {expectations.clojure.test/more->
4+ hooks.com.github.seancorfield.expectations/more->}}
5+ :lint-as
26 {expectations.clojure.test/defexpect clojure.test/deftest
37 expectations.clojure.test/from-each clojure.core/for
4- expectations.clojure.test/more-of clj-kondo.lint-as/def-catch-all}}
8+ expectations.clojure.test/more-of clj-kondo.lint-as/def-catch-all
9+ expectations.clojure.test/=? clojure.core/=}}
Original file line number Diff line number Diff line change 1+ (ns hooks.com.github.seancorfield.expectations
2+ (:require [clj-kondo.hooks-api :as api]))
3+
4+ (defn more-> [{:keys [node]}]
5+ (let [tail (rest (:children node))
6+ rewritten
7+ (api/list-node
8+ (list*
9+ (api/token-node 'cond->)
10+ (api/token-node 'nil)
11+ tail))]
12+ {:node rewritten}))
Original file line number Diff line number Diff line change 4343 :cljs js/Error.)
4444 (str ~s " should only be used inside expect" ))))
4545
46+ (defmacro =?
47+ " Internal fuzzy-equality test (clojure.test/assert-expr)."
48+ [expected actual & [form]]
49+ (bad-usage " =?" ))
50+
4651(defmacro in
4752 " `(expect expected (in actual))` -- expect a subset of a collection.
4853
Original file line number Diff line number Diff line change 1919 #?(:cljs [cljs.spec.alpha :as s])
2020 #?(:cljs [expectations.clojure.test-spec])
2121 #?(:clj [expectations.clojure.test :refer
22- [from-each in more more-of ] :as sut]
22+ [from-each in more more-> more-of =? ] :as sut]
2323 :cljs [expectations.clojure.test
2424 :include-macros true
2525 :as sut])))
You can’t perform that action at this time.
0 commit comments