Skip to content

Commit

Permalink
Merge pull request levand#30 from jasonrudolph/detach-children
Browse files Browse the repository at this point in the history
Problem when passing results of domina/children to domina/detach!
  • Loading branch information
levand committed Jul 6, 2012
2 parents 8c60ac8 + 0111ea0 commit 2d48c56
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/cljs/domina/test.cljs
Expand Up @@ -278,6 +278,14 @@
(append! (xpath "//div[@class='d1']") n)
(assert (= 3 (count (nodes (xpath "//div[@class='d1']/p"))))))))

(add-test "detach child nodes"
#(do (reset)
(standard-fixture)
(let [parent (xpath "//div[@class='d1']")
detached-children (detach! (children parent))]
(assert (= 0 (count (nodes (xpath "//div[@class='d1']/p")))))
(assert (= 3 (count detached-children))))))

(add-test "clear a node's contents"
#(do (reset)
(standard-fixture)
Expand Down

0 comments on commit 2d48c56

Please sign in to comment.