From df492b108db6ece949410690316e5cfa6ba15569 Mon Sep 17 00:00:00 2001 From: Tomasz Rybarczyk Date: Sat, 22 Dec 2018 19:47:31 +0100 Subject: [PATCH] Improve test debug log --- test/Main.purs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/Main.purs b/test/Main.purs index 1de776c..46c1d3f 100644 --- a/test/Main.purs +++ b/test/Main.purs @@ -26,6 +26,7 @@ import Effect.Aff (Aff, error, launchAff) import Effect.Class (liftEffect) import Effect.Exception (message) import Foreign.Object (Object, fromFoldable) +import Global.Unsafe (unsafeStringify) import Math ((%)) import Partial.Unsafe (unsafePartial) import Test.Assert (assert) @@ -66,7 +67,7 @@ transactionTest name action = checkPGErrors :: PG Unit -> Aff Unit checkPGErrors action = do 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 now ∷ Effect Instant