X-Git-Url: http://git.lukelau.me/?a=blobdiff_plain;f=test%2FParsingTests.hs;h=c8977b53e33f6915be4aae84bfa19d0c88b89578;hb=12ac9c23d054e92a82146320e2b061c11a87e3f1;hp=7824ef3b4f7ff930388b7f3ebcd53274c21f901d;hpb=88c70a40654c7152fb50b2a4e171fbdc00324f51;p=lsp-test.git diff --git a/test/ParsingTests.hs b/test/ParsingTests.hs index 7824ef3..c8977b5 100644 --- a/test/ParsingTests.hs +++ b/test/ParsingTests.hs @@ -18,10 +18,9 @@ parsingSpec = (PublishDiagnosticsParams (Uri "foo") (List []))) it "get picked up" $ do - let - source = yield testDiag + let source = yield testDiag session = do - diags <- publishDiagnosticsNotification + diags <- publishDiagnosticsNotification :: ConduitParser FromServerMessage IO PublishDiagnosticsNotification return $ diags ^. params . uri runConduit (source .| runConduitParser session) `shouldReturn` Uri "foo" it "get picked up after skipping others before" $ do @@ -33,6 +32,6 @@ parsingSpec = notTestDiag = NotLogMessage (NotificationMessage "2.0" WindowLogMessage (LogMessageParams MtLog "foo")) source = yield notTestDiag >> yield testDiag session = do - diags <- skipManyTill notification publishDiagnosticsNotification + diags <- skipManyTill anyNotification notification :: ConduitParser FromServerMessage IO PublishDiagnosticsNotification return $ diags ^. params . uri runConduit (source .| runConduitParser session) `shouldReturn` Uri "foo"