X-Git-Url: https://git.lukelau.me/?p=lsp-test.git;a=blobdiff_plain;f=test%2FTest.hs;h=ed8c6b5f5f0c6ce0e8d2b88fd8bbe40bcf0f7efb;hp=22f8e21996df80c4b9e9a81b95d07edbab5e72d3;hb=14966566f56badb30e257defe62463e484a2892a;hpb=a61a867b278edc025489298b360340e7ddec05e7 diff --git a/test/Test.hs b/test/Test.hs index 22f8e21..ed8c6b5 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -93,7 +93,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 @@ -333,6 +335,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