File tree Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Expand file tree Collapse file tree 1 file changed +1
-23
lines changed Original file line number Diff line number Diff line change @@ -27,38 +27,16 @@ import qualified Language.LSP.Protocol.Lens as L
2727import Language.LSP.Test as Test
2828import System.FilePath ((</>) )
2929import Test.Hls
30- import Test.Hls.Command
3130
3231{-# ANN module ("HLint: ignore Reduce duplication"::String) #-}
3332
3433tests :: TestTree
3534tests = testGroup " plugin config" [
3635 -- Note: there are more comprehensive tests over config in hls-hlint-plugin
3736 -- TODO: Add generic tests over some example plugin
38- configParsingTests, genericConfigTests
37+ genericConfigTests
3938 ]
4039
41- configParsingTests :: TestTree
42- configParsingTests = testGroup " config parsing"
43- [ testCase " empty object as user configuration should not send error logMessage" $ runConfigSession " " $ do
44- let config = object []
45- sendConfigurationChanged (toJSON config)
46-
47- -- Send custom request so server returns a response to prevent blocking
48- void $ sendNotification (SMethod_CustomMethod (Proxy @ " non-existent-method" )) Null
49-
50- logNot <- skipManyTill Test. anyMessage (message SMethod_WindowLogMessage )
51-
52- liftIO $ (logNot ^. L. params . L. type_) > MessageType_Error
53- || " non-existent-method" `T.isInfixOf` (logNot ^. L. params . L. message)
54- @? " Server sends logMessage with MessageType = Error"
55- ]
56-
57- where
58- runConfigSession :: FilePath -> Session a -> IO a
59- runConfigSession subdir =
60- failIfSessionTimeout . runSession hlsCommand fullCaps (" test/testdata" </> subdir)
61-
6240genericConfigTests :: TestTree
6341genericConfigTests = testGroup " generic plugin config"
6442 [
You can’t perform that action at this time.
0 commit comments