mirror of
https://github.com/metosin/reitit.git
synced 2026-02-13 14:55:17 +00:00
refactor: Ignore :missing-protocol-method linter
This commit is contained in:
parent
54a040f136
commit
2597d14125
1 changed files with 8 additions and 7 deletions
|
|
@ -1,10 +1,9 @@
|
||||||
(ns reitit.core-test
|
(ns reitit.core-test
|
||||||
(:require [clojure.test :refer [are deftest is testing]]
|
(:require [clojure.test :refer [are deftest is testing]]
|
||||||
[reitit.core :as r #?@(:cljs [:refer [Router]])]
|
[reitit.core :as r]
|
||||||
[reitit.impl :as impl])
|
[reitit.impl :as impl])
|
||||||
#?(:clj
|
#?(:clj
|
||||||
(:import (clojure.lang ExceptionInfo)
|
(:import (clojure.lang ExceptionInfo))))
|
||||||
(reitit.core Router))))
|
|
||||||
|
|
||||||
(defn- var-handler [& _]
|
(defn- var-handler [& _]
|
||||||
"var-handler")
|
"var-handler")
|
||||||
|
|
@ -261,10 +260,12 @@
|
||||||
(is (= #'var-handler result))))))
|
(is (= #'var-handler result))))))
|
||||||
|
|
||||||
(testing "custom router"
|
(testing "custom router"
|
||||||
(let [router (r/router ["/ping"] {:router (fn [_ _]
|
(let [router (r/router
|
||||||
(reify Router
|
["/ping"]
|
||||||
(r/router-name [_]
|
{:router (fn [_ _]
|
||||||
::custom)))})]
|
#_{:clj-kondo/ignore [:missing-protocol-method]}
|
||||||
|
(reify r/Router
|
||||||
|
(router-name [_] ::custom)))})]
|
||||||
(is (= ::custom (r/router-name router)))))
|
(is (= ::custom (r/router-name router)))))
|
||||||
|
|
||||||
(testing "bide sample"
|
(testing "bide sample"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue