Skip to content

Commit

Permalink
Use new test utils (from reagent-next brach) with React 17 mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Deraen committed Nov 23, 2024
1 parent 21fe4f2 commit 421bb35
Show file tree
Hide file tree
Showing 9 changed files with 504 additions and 503 deletions.
3 changes: 2 additions & 1 deletion .clj-kondo/config.edn
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{:lint-as {reagent.core/with-let clojure.core/let
reagenttest.utils/deftest clojure.test/deftest}
reagenttest.utils/deftest clojure.test/deftest
reagenttest.utils/with-render clojure.core/let}
:linters {:unused-binding {:level :off}
:missing-else-branch {:level :off}
:unused-referred-var {:exclude {cljs.test [deftest testing is]}}
Expand Down
9 changes: 9 additions & 0 deletions .clj-kondo/funcool/promesa/config.edn
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{:lint-as {promesa.core/-> clojure.core/->
promesa.core/->> clojure.core/->>
promesa.core/as-> clojure.core/as->
promesa.core/let clojure.core/let
promesa.core/plet clojure.core/let
promesa.core/loop clojure.core/loop
promesa.core/recur clojure.core/recur
promesa.core/with-redefs clojure.core/with-redefs
promesa.core/doseq clojure.core/doseq}}
1 change: 1 addition & 0 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
[figwheel-sidecar "0.5.20"]
[doo "0.1.11"]
[cljsjs/prop-types "15.8.1-0"]
[funcool/promesa "11.0.678"]

[cljsjs/react "18.3.1-1"]
[cljsjs/react-dom "18.3.1-1"]
Expand Down
3 changes: 2 additions & 1 deletion shadow-cljs.edn
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@
:source-map true
:compiler-options {:infer-externs :auto}
:ns-regexp "(reagenttest\\.test.*|reagent\\..*-test)"}}
:dependencies [[doo "0.1.11"]]}
:dependencies [[doo "0.1.11"]
[funcool/promesa "11.0.678"]]}
2 changes: 1 addition & 1 deletion src/reagent/impl/component.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@

(defn ^boolean reagent-class? [c]
(and (fn? c)
(some? (some-> c (.-prototype) (.-reagentRender)))))
(some? (some-> c (.-prototype) ^clj (.-reagentRender)))))

(defn ^boolean react-class? [c]
(and (fn? c)
Expand Down
Loading

0 comments on commit 421bb35

Please sign in to comment.