mirror of
https://github.com/rowtype-yoga/purescript-docs-search.git
synced 2024-09-11 12:35:37 +03:00
25 lines
424 B
Plaintext
25 lines
424 B
Plaintext
module Test.Extra where
|
|
|
|
import Prelude
|
|
|
|
import Data.Either (Either(..))
|
|
import Effect.Aff (Aff)
|
|
import Test.Spec.Assertions (shouldEqual)
|
|
|
|
|
|
assertRight
|
|
:: forall a b
|
|
. Show a
|
|
=> Show b
|
|
=> Eq a
|
|
=> Eq b
|
|
=> Either b a
|
|
-> a
|
|
-> Aff Unit
|
|
assertRight eiActual expected =
|
|
case eiActual of
|
|
Left _ -> do
|
|
Right expected `shouldEqual` eiActual
|
|
Right _ -> do
|
|
Right expected `shouldEqual` eiActual
|