mirror of
https://github.com/status-im/reagent.git
synced 2025-01-13 13:24:47 +00:00
Remove test divs from dom after error
This commit is contained in:
parent
3fd0f1b1d8
commit
7d074b55ed
@ -34,11 +34,13 @@
|
||||
(defn with-mounted-component [comp f]
|
||||
(when isClient
|
||||
(let [div (add-test-div "_testreagent")]
|
||||
(try
|
||||
(let [c (r/render comp div)]
|
||||
(f c div)
|
||||
(f c div))
|
||||
(finally
|
||||
(r/unmount-component-at-node div)
|
||||
(r/flush)
|
||||
(.removeChild (.-body js/document) div)))))
|
||||
(.removeChild (.-body js/document) div))))))
|
||||
|
||||
(defn found-in [re div]
|
||||
(let [res (.-innerHTML div)]
|
||||
|
Loading…
x
Reference in New Issue
Block a user