X-Git-Url: http://git.lukelau.me/?p=lsp-test.git;a=blobdiff_plain;f=test%2FParsingTests.hs;h=e0ed6f66ee4600b89057a2eee6e59290f84942ea;hp=fe8d36671d7fca4192498a12a3445c67a1d3a397;hb=a4c1143848809be8aed55403dc3187a256dcbe9b;hpb=fe5448266f5db772dd3f10be432cd56581bbcb40 diff --git a/test/ParsingTests.hs b/test/ParsingTests.hs index fe8d366..e0ed6f6 100644 --- a/test/ParsingTests.hs +++ b/test/ParsingTests.hs @@ -17,28 +17,28 @@ instance MonadSessionConfig IO where sessionConfig = return def parsingSpec :: Spec -parsingSpec = - describe "diagnostics" $ do - let testDiag = NotPublishDiagnostics - (NotificationMessage "2.0" - TextDocumentPublishDiagnostics - (PublishDiagnosticsParams (Uri "foo") - (List []))) - it "get picked up" $ do - let source = yield testDiag - session = do - diags <- publishDiagnosticsNotification :: TestSession PublishDiagnosticsNotification - return $ diags ^. params . uri - runConduit (source .| runConduitParser session) `shouldReturn` Uri "foo" - it "get picked up after skipping others before" $ do - let testDiag = NotPublishDiagnostics - (NotificationMessage "2.0" - TextDocumentPublishDiagnostics - (PublishDiagnosticsParams (Uri "foo") - (List []))) - notTestDiag = NotLogMessage (NotificationMessage "2.0" WindowLogMessage (LogMessageParams MtLog "foo")) - source = yield notTestDiag >> yield testDiag - session = do - diags <- skipManyTill anyNotification notification :: TestSession PublishDiagnosticsNotification - return $ diags ^. params . uri - runConduit (source .| runConduitParser session) `shouldReturn` Uri "foo" \ No newline at end of file +parsingSpec = return () +-- describe "diagnostics" $ do +-- let testDiag = NotPublishDiagnostics +-- (NotificationMessage "2.0" +-- TextDocumentPublishDiagnostics +-- (PublishDiagnosticsParams (Uri "foo") +-- (List []))) +-- it "get picked up" $ do +-- let source = yield testDiag +-- session = do +-- diags <- publishDiagnosticsNotification :: TestSession PublishDiagnosticsNotification +-- return $ diags ^. params . uri +-- runConduit (source .| runConduitParser session) `shouldReturn` Uri "foo" +-- it "get picked up after skipping others before" $ do +-- let testDiag = NotPublishDiagnostics +-- (NotificationMessage "2.0" +-- TextDocumentPublishDiagnostics +-- (PublishDiagnosticsParams (Uri "foo") +-- (List []))) +-- notTestDiag = NotLogMessage (NotificationMessage "2.0" WindowLogMessage (LogMessageParams MtLog "foo")) +-- source = yield notTestDiag >> yield testDiag +-- session = do +-- diags <- skipManyTill anyNotification notification :: TestSession PublishDiagnosticsNotification +-- return $ diags ^. params . uri +-- runConduit (source .| runConduitParser session) `shouldReturn` Uri "foo"