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
            -- ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.