Commit 9d66f420 authored by James Laver's avatar James Laver

Update R.Test to use new ffi-simple

parent 184365b8
...@@ -37,7 +37,7 @@ render e = pure $ raw { getByText=getByText, getByTestId=getByTestId } ...@@ -37,7 +37,7 @@ render e = pure $ raw { getByText=getByText, getByTestId=getByTestId }
-- | Make react behave more predictably in tests -- | Make react behave more predictably in tests
act :: forall t. (Unit -> Effect t) -> Effect t act :: forall t. (Unit -> Effect t) -> Effect t
act f = testUtils ... "act" $ [ delay f ] act f = testUtils ... "act" $ [ delay unit f ]
fireClick :: DOM.Element -> Effect Unit fireClick :: DOM.Element -> Effect Unit
fireClick = fireEvent "click" fireClick = fireEvent "click"
...@@ -46,5 +46,5 @@ fireEvent :: String -> DOM.Element -> Effect Unit ...@@ -46,5 +46,5 @@ fireEvent :: String -> DOM.Element -> Effect Unit
fireEvent ev el = pure $ (testingLibrary .. "fireEvent") ... ev $ [el] fireEvent ev el = pure $ (testingLibrary .. "fireEvent") ... ev $ [el]
cleanup :: Effect Unit cleanup :: Effect Unit
cleanup = delay $ \_ -> pure $ testingLibrary ... "cleanup" $ [] cleanup = delay unit $ \_ -> pure $ testingLibrary ... "cleanup" $ []
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment