Make browser tests clean up after themselves properly

This commit is contained in:
Dan Holmsand 2014-12-03 16:14:07 +01:00
parent e193518292
commit 0215a4a093
2 changed files with 4 additions and 2 deletions

View File

@ -26,7 +26,8 @@
(let [div (add-test-div "_testreagent")]
(let [comp (reagent/render-component comp div #(f comp div))]
(reagent/unmount-component-at-node div)
(reagent/flush)))))
(reagent/flush)
(.removeChild (.-body js/document) div)))))
(defn found-in [re div]
(let [res (.-innerHTML div)]

View File

@ -15,7 +15,8 @@
(let [div (add-test-div "_testreagent")]
(let [comp (r/render-component comp div #(f comp div))]
(r/unmount-component-at-node div)
(r/flush)))))
(r/flush)
(.removeChild (.-body js/document) div)))))
(defn found-in [re div]
(let [res (.-innerHTML div)]