X-Git-Url: http://git.lukelau.me/?a=blobdiff_plain;f=test%2FTest.hs;h=dc770d9205efc21e22147660380470316ed371a1;hb=cb75f5731bd7d85b1f1c684cbb2ce90cf82a1e34;hp=342d889f464d73ce9435c56148bc428c5a7844ae;hpb=adc4d77e1e5940b6d3230be8134428e56c593d56;p=lsp-test.git diff --git a/test/Test.hs b/test/Test.hs index 342d889..dc770d9 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -91,7 +91,9 @@ main = hspec $ do getDocumentSymbols doc -- should now timeout skipManyTill anyMessage message :: Session ApplyWorkspaceEditRequest - in sesh `shouldThrow` (== Timeout) + isTimeout (Timeout _) = True + isTimeout _ = False + in sesh `shouldThrow` isTimeout describe "SessionException" $ do @@ -331,6 +333,12 @@ main = hspec $ do pred _ = False void $ satisfy pred + describe "ignoreLogNotifications" $ + it "works" $ + runSessionWithConfig (defaultConfig { ignoreLogNotifications = True }) "hie" fullCaps "test/data" $ do + openDoc "Format.hs" "haskell" + void publishDiagnosticsNotification + mkRange sl sc el ec = Range (Position sl sc) (Position el ec) didChangeCaps :: ClientCapabilities