Skip to content

Commit

Permalink
Merge pull request #613 from reagent-project/update-tests
Browse files Browse the repository at this point in the history
Use new test utils (from reagent-next brach) with React 17 mode
  • Loading branch information
Deraen authored Nov 27, 2024
2 parents 21fe4f2 + 490cf11 commit 842f33a
Show file tree
Hide file tree
Showing 10 changed files with 539 additions and 604 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}}
5 changes: 3 additions & 2 deletions deps.edn
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{:paths ["src" "test" "examples/todomvc/src" "examples/simple/src" "examples/geometry/src" "demo"]
:deps {org.clojure/clojurescript {:mvn/version "1.11.60"}
doo/doo {:mvn/version "0.1.11"}}}
:deps {org.clojure/clojurescript {:mvn/version "1.11.132"}
doo/doo {:mvn/version "0.1.11"}
funcool/promesa {:mvn/version "11.0.678"}}}
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 842f33a

Please sign in to comment.