From 793de71b990d4647296819ec54dbbb24026b166c Mon Sep 17 00:00:00 2001 From: Brian Noguchi Date: Mon, 10 Jul 2017 10:50:59 -0700 Subject: [PATCH] Failing test demonstrating GH-877 --- src/test/om/next/next_test.clj | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/test/om/next/next_test.clj b/src/test/om/next/next_test.clj index cb4f8413..b5c8f6d3 100644 --- a/src/test/om/next/next_test.clj +++ b/src/test/om/next/next_test.clj @@ -909,3 +909,16 @@ (#'om/extract-static-methods '[Multi (method-a [this arg] :a) (method-a [this] :b)]))))) + +(deftest test-om-877-recursive-edge-case + (let [query [{:tree [:id + :value + {:children '...}]}] + state {:tree {:id 0 :value 42 + :children [{:id 1 :value 43 + :children [{:id 2 :value 99 + :children []}]} + {:id 3 :value 101 + :children []}]}}] + (is (= state + (om/db->tree query state state)))))