Skip to content

Commit

Permalink
Remove unncessary promesa use in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Deraen committed Nov 28, 2024
1 parent 621fc81 commit 8bb2c67
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions test/reagenttest/testreagent.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
[clojure.test :as t :refer-macros [is deftest testing]]
[goog.object :as gobj]
[goog.string :as gstr]
[promesa.core :as p]
[react :as react]
[reagent.core :as r]
[reagent.debug :as debug :refer [dev?]]
Expand Down Expand Up @@ -523,23 +522,23 @@

(u/deftest ^:dom test-keys
(u/async
(p/let [a nil ;; (r/atom "a")
c (fn key-tester []
[:div
(for [i (range 3)]
^{:key i} [:p i (some-> a deref)])
(for [i (range 3)]
[:p {:key i} i (some-> a deref)])])]
(let [a nil ;; (r/atom "a")
c (fn key-tester []
[:div
(for [i (range 3)]
^{:key i} [:p i (some-> a deref)])
(for [i (range 3)]
[:p {:key i} i (some-> a deref)])])]
(u/with-render [_div [c]]
{:capture-errors true}
(is (empty? (:warn @reagent.debug/warnings)))))

(testing "Check warning text can be produced even if hiccup contains function literals"
(p/let [c (fn key-tester []
[:div
(for [i (range 3)]
^{:key nil}
[:button {:on-click #(js/console.log %)}])])]
(let [c (fn key-tester []
[:div
(for [i (range 3)]
^{:key nil}
[:button {:on-click #(js/console.log %)}])])]
(u/with-render [_div [c]]
{:capture-errors true}
(when (dev?)
Expand Down

0 comments on commit 8bb2c67

Please sign in to comment.