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
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
2
6
{expectations.clojure.test/defexpect clojure.test/deftest
3
7
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.
8
8
9
9
* 2.0.next in progress
10
10
* 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).
11
12
* Address [ #27 ] ( https://github.com/clojure-expectations/clojure-test/issues/27 ) by changing ` refer ` 'd note in stub macros' docstrings.
12
13
13
14
* 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
2
6
{expectations.clojure.test/defexpect clojure.test/deftest
3
7
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 43
43
:cljs js/Error.)
44
44
(str ~s " should only be used inside expect" ))))
45
45
46
+ (defmacro =?
47
+ " Internal fuzzy-equality test (clojure.test/assert-expr)."
48
+ [expected actual & [form]]
49
+ (bad-usage " =?" ))
50
+
46
51
(defmacro in
47
52
" `(expect expected (in actual))` -- expect a subset of a collection.
48
53
Original file line number Diff line number Diff line change 19
19
#?(:cljs [cljs.spec.alpha :as s])
20
20
#?(:cljs [expectations.clojure.test-spec])
21
21
#?(:clj [expectations.clojure.test :refer
22
- [from-each in more more-of ] :as sut]
22
+ [from-each in more more-> more-of =? ] :as sut]
23
23
:cljs [expectations.clojure.test
24
24
:include-macros true
25
25
:as sut])))
You can’t perform that action at this time.
0 commit comments