Skip to content

Commit 9553008

Browse files
committed
Remove weird test
1 parent 6824b78 commit 9553008

File tree

1 file changed

+13
-36
lines changed

1 file changed

+13
-36
lines changed

test/functional/Config.hs

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,58 +6,35 @@
66
module Config (tests) where
77

88
import Control.DeepSeq
9-
import Control.Lens hiding (List, (.=))
9+
import Control.Lens hiding (List, (.=))
1010
import Control.Monad
1111
import Data.Aeson
1212
import Data.Hashable
13-
import qualified Data.HashMap.Strict as HM
14-
import qualified Data.Map as Map
15-
import qualified Data.Text as T
16-
import Data.Typeable (Typeable)
17-
import Development.IDE (RuleResult, action, define,
18-
getFilesOfInterestUntracked,
19-
getPluginConfigAction, ideErrorText,
20-
uses_)
21-
import Development.IDE.Test (expectDiagnostics)
13+
import qualified Data.HashMap.Strict as HM
14+
import qualified Data.Map as Map
15+
import qualified Data.Text as T
16+
import Data.Typeable (Typeable)
17+
import Development.IDE (RuleResult, action, define,
18+
getFilesOfInterestUntracked,
19+
getPluginConfigAction, ideErrorText,
20+
uses_)
21+
import Development.IDE.Test (expectDiagnostics)
2222
import GHC.Generics
2323
import Ide.Plugin.Config
2424
import Ide.Types
25-
import Language.LSP.Test as Test
26-
import qualified Language.LSP.Types.Lens as L
27-
import System.FilePath ((</>))
25+
import Language.LSP.Test as Test
26+
import System.FilePath ((</>))
2827
import Test.Hls
29-
import Test.Hls.Command
3028

3129
{-# ANN module ("HLint: ignore Reduce duplication"::String) #-}
3230

3331
tests :: TestTree
3432
tests = testGroup "plugin config" [
3533
-- Note: there are more comprehensive tests over config in hls-hlint-plugin
3634
-- TODO: Add generic tests over some example plugin
37-
configParsingTests, genericConfigTests
35+
genericConfigTests
3836
]
3937

40-
configParsingTests :: TestTree
41-
configParsingTests = testGroup "config parsing"
42-
[ testCase "empty object as user configuration should not send error logMessage" $ runConfigSession "" $ do
43-
let config = object []
44-
sendConfigurationChanged (toJSON config)
45-
46-
-- Send custom request so server returns a response to prevent blocking
47-
void $ sendNotification (SCustomMethod "non-existent-method") Null
48-
49-
logNot <- skipManyTill Test.anyMessage (message SWindowLogMessage)
50-
51-
liftIO $ (logNot ^. L.params . L.xtype) > MtError
52-
|| "non-existent-method" `T.isInfixOf` (logNot ^. L.params . L.message)
53-
@? "Server sends logMessage with MessageType = Error"
54-
]
55-
56-
where
57-
runConfigSession :: FilePath -> Session a -> IO a
58-
runConfigSession subdir =
59-
failIfSessionTimeout . runSession hlsCommand fullCaps ("test/testdata" </> subdir)
60-
6138
genericConfigTests :: TestTree
6239
genericConfigTests = testGroup "generic plugin config"
6340
[

0 commit comments

Comments
 (0)