reflex-test-host-0.1.1.0: reflex host methods for testing without external events

Safe HaskellNone
LanguageHaskell2010

Reflex.Test.Host

Description

 
Synopsis

Documentation

data AppIn t b e Source #

Constructors

AppIn 

data AppOut t b e Source #

Constructors

AppOut 

data AppFrame t bIn eIn bOut eOut m Source #

Constructors

AppFrame 

Fields

getAppFrame :: forall t bIn eIn bOut eOut m. TestGuestConstraints t m => (AppIn t bIn eIn -> TestGuestMonad t m (AppOut t bOut eOut)) -> bIn -> m (AppFrame t bIn eIn bOut eOut m) Source #

make an AppFrame that takes an input behavior and event and returns an output behavior and event. This will also fire the PostBuild event if there are any subscribers.

tickAppFrame :: AppFrame t bIn eIn bOut eOut m -> Maybe (These bIn eIn) -> m [(bOut, Maybe eOut)] Source #

Tick an app frame once with optional input behavior and event values. Returns behaviors and events from the app's output for each frame that run for the input (i.e. runWithAdjust and performEvent may cause several frames to run for each input)

N.B. output behavior will not reflect changes that happen during its frame i.e. this is analogous to tag and tagPromptlyDyn. If you need the most recent behavior value you can always call tickAppFrame with Nothing as input

runAppSimple :: (t ~ SpiderTimeline Global, m ~ SpiderHost Global) => (Event t eIn -> TestGuestMonad t m (Event t eOut)) -> [eIn] -> IO [[Maybe eOut]] Source #

run an app with provided list of input events returns list of results for each input. Each result is a list of events from the app's output for each frame that run for the input. see comments for tickAppFrame

runApp :: (t ~ SpiderTimeline Global, m ~ SpiderHost Global) => (AppIn t bIn eIn -> TestGuestMonad t m (AppOut t bOut eOut)) -> bIn -> [Maybe (These bIn eIn)] -> IO [[(bOut, Maybe eOut)]] Source #

calls tickAppFrame for each input in a list and returns collected results see comments for tickAppFrame

runApp' :: (t ~ SpiderTimeline Global, m ~ SpiderHost Global) => (Event t eIn -> TestGuestMonad t m (Event t eOut)) -> [Maybe eIn] -> IO [[Maybe eOut]] Source #

same as runAppSimple except input event for each frame is optional see comments for tickAppFrame

runAppB :: (t ~ SpiderTimeline Global, m ~ SpiderHost Global) => (Event t eIn -> TestGuestMonad t m (Behavior t bOut)) -> [Maybe eIn] -> IO [[bOut]] Source #

same as runApp' except only returns sampled output behavior see comments for tickAppFrame