generated from tpl/purs
Improve test debug log
This commit is contained in:
parent
bd055928ae
commit
df492b108d
@ -26,6 +26,7 @@ import Effect.Aff (Aff, error, launchAff)
|
|||||||
import Effect.Class (liftEffect)
|
import Effect.Class (liftEffect)
|
||||||
import Effect.Exception (message)
|
import Effect.Exception (message)
|
||||||
import Foreign.Object (Object, fromFoldable)
|
import Foreign.Object (Object, fromFoldable)
|
||||||
|
import Global.Unsafe (unsafeStringify)
|
||||||
import Math ((%))
|
import Math ((%))
|
||||||
import Partial.Unsafe (unsafePartial)
|
import Partial.Unsafe (unsafePartial)
|
||||||
import Test.Assert (assert)
|
import Test.Assert (assert)
|
||||||
@ -66,7 +67,7 @@ transactionTest name action =
|
|||||||
checkPGErrors :: PG Unit -> Aff Unit
|
checkPGErrors :: PG Unit -> Aff Unit
|
||||||
checkPGErrors action = do
|
checkPGErrors action = do
|
||||||
runExceptT action >>= case _ of
|
runExceptT action >>= case _ of
|
||||||
Left pgError -> Test.Unit.failure "Unexpected PostgreSQL error occured"
|
Left pgError -> Test.Unit.failure ("Unexpected PostgreSQL error occured:" <> unsafeStringify pgError)
|
||||||
Right _ -> pure unit
|
Right _ -> pure unit
|
||||||
|
|
||||||
now ∷ Effect Instant
|
now ∷ Effect Instant
|
||||||
|
Loading…
Reference in New Issue
Block a user