From: Luke Lau Date: Wed, 5 Dec 2018 01:03:25 +0000 (+0000) Subject: Make "fails a test" test more precise X-Git-Tag: 0.5.0.2~1 X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=commitdiff_plain;h=08610aa7c21ec8166db8fdec20a785f543f155b3 Make "fails a test" test more precise --- diff --git a/test/Test.hs b/test/Test.hs index e4aae55..f73c186 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -30,12 +30,11 @@ import System.Timeout main = hspec $ do describe "Session" $ do it "fails a test" $ - -- TODO: Catch the exception in lsp-test and provide nicer output let session = runSession "hie" fullCaps "test/data/renamePass" $ do openDoc "Desktop/simple.hs" "haskell" skipMany loggingNotification anyRequest - in session `shouldThrow` anyException + in session `shouldThrow` anySessionException it "initializeResponse" $ runSession "hie" fullCaps "test/data/renamePass" $ do rsp <- initializeResponse liftIO $ rsp ^. result `shouldNotBe` Nothing