3

How do I write a Tasty unit-test for an error that may be logged from inside the Trace monad?

import Control.Monad.Freer.Extras (logError, throwError)

trace1 :: Input -> Trace.EmulatorTrace ()
trace1 x =
    case fromInput x of
        Left e -> 
            logError @String $ unpack e -- ###########

        Right d -> do
            h1 <- Trace.activateContractWallet (Wallet 1) endpoints
            -- ...

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.