Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- spec :: Spec
- sendsAnErrorWhenInputCannotBeDecoded :: PortNumber -> Expectation
- matchGreetings :: Value -> Bool
- isGreetings :: ServerOutput tx -> Bool
- waitForClients :: (MonadSTM m, Ord a, Num a) => TVar m a -> m ()
- testClient :: TQueue IO (ServerOutput SimpleTx) -> TVar IO Int -> Connection -> IO ()
- dummyChainHandle :: Chain tx IO
- allowEverythingServerOutputFilter :: ServerOutputFilter tx
- noop :: Applicative m => a -> m ()
- withTestAPIServer :: PortNumber -> Party -> PersistenceIncremental (TimedServerOutput SimpleTx) IO -> Tracer IO APIServerLog -> (Server SimpleTx IO -> IO ()) -> IO ()
- withClient :: PortNumber -> String -> (Connection -> IO ()) -> IO ()
- mockPersistence :: Applicative m => PersistenceIncremental a m
- mockPersistence' :: Applicative m => [a] -> PersistenceIncremental a m
- waitForValue :: HasCallStack => PortNumber -> (Value -> Maybe ()) -> IO ()
- waitMatch :: HasCallStack => Natural -> Connection -> (Value -> Maybe a) -> IO a
- shouldSatisfyAll :: Show a => [a] -> [a -> Bool] -> Expectation
Documentation
sendsAnErrorWhenInputCannotBeDecoded :: PortNumber -> Expectation Source #
matchGreetings :: Value -> Bool Source #
isGreetings :: ServerOutput tx -> Bool Source #
waitForClients :: (MonadSTM m, Ord a, Num a) => TVar m a -> m () Source #
dummyChainHandle :: Chain tx IO Source #
allowEverythingServerOutputFilter :: ServerOutputFilter tx Source #
noop :: Applicative m => a -> m () Source #
withTestAPIServer :: PortNumber -> Party -> PersistenceIncremental (TimedServerOutput SimpleTx) IO -> Tracer IO APIServerLog -> (Server SimpleTx IO -> IO ()) -> IO () Source #
withClient :: PortNumber -> String -> (Connection -> IO ()) -> IO () Source #
Connect to a websocket server running at given path. Fails if not connected within 2 seconds.
mockPersistence :: Applicative m => PersistenceIncremental a m Source #
Mocked persistence handle which just does nothing.
mockPersistence' :: Applicative m => [a] -> PersistenceIncremental a m Source #
Mocked persistence which does not contain some constant elements.
waitForValue :: HasCallStack => PortNumber -> (Value -> Maybe ()) -> IO () Source #
waitMatch :: HasCallStack => Natural -> Connection -> (Value -> Maybe a) -> IO a Source #
Wait up to some time for an API server output to match the given predicate.
shouldSatisfyAll :: Show a => [a] -> [a -> Bool] -> Expectation Source #