- describe "Replay" $ do
- it "passes a test" $ do
- replay "test/recordings/renamePass/client.log"
- "test/recordings/renamePass/server.log"
- `shouldReturn` True
+ describe "manual session validation" $ do
+ it "passes a test" $
+ runSession "test/recordings/renamePass" $ do
+ doc <- openDoc "Desktop/simple.hs" "haskell"
+
+ skipMany loggingNotification
+
+ NotPublishDiagnostics diagsNot <- notification
+
+ liftIO $ diagsNot ^. params . diagnostics `shouldBe` List []
+
+ sendRequest (Proxy :: Proxy DocumentSymbolRequest)
+ TextDocumentDocumentSymbol
+ (DocumentSymbolParams doc)
+
+ RspDocumentSymbols rspSymbols <- response
+
+ liftIO $ do
+ let (List symbols) = fromJust (rspSymbols ^. result)
+ mainSymbol = head symbols
+ mainSymbol ^. name `shouldBe` "main"
+ mainSymbol ^. kind `shouldBe` SkFunction
+ mainSymbol ^. location . range `shouldBe` Range (Position 3 0) (Position 3 4)
+ mainSymbol ^. containerName `shouldBe` Nothing
+