Skip to content

Commit 3a6f208

Browse files
Merge pull request #263 from reflex-frp/dn-add-test-folddyn
Add testcase of nested foldDyn from #214
2 parents 5fca658 + 7ae1e23 commit 3a6f208

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/Reflex/Test/CrossImpl.hs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -218,6 +218,11 @@ testCases =
218218
bb <- hold b $ pushAlways (const $ hold "asdf" eo) eo
219219
let b' = pull $ sample =<< sample bb
220220
return (b', e)
221+
, (,) "foldDynWhileFiring" $ TestCase (Map.singleton 0 "zxc", Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(_, e) -> do
222+
d <- foldDyn (:) [] $
223+
pushAlways (\a -> foldDyn (:) [a] e) e
224+
let b = current (join (fmap distributeListOverDynPure d))
225+
return (b, e)
221226
, (,) "joinDyn" $ TestCase (Map.singleton 0 (0 :: Int), Map.fromList [(1, "qwer"), (2, "lkj")]) $ \(b, e) -> do
222227
bb <- hold "b" e
223228
bd <- hold never . fmap (const e) =<< headE e

0 commit comments

Comments
 (0)