Merge branch 'master' into github-actions
[lsp-test.git] / test / Test.hs
index c662d46af44fb141fe0ec7d13172fe119dbbb9cc..22f8e21996df80c4b9e9a81b95d07edbab5e72d3 100644 (file)
@@ -240,7 +240,8 @@ main = hspec $ do
       noDiagnostics
       noDiagnostics
 
-      item:_ <- getCompletions doc (Position 5 5)
+      comps <- getCompletions doc (Position 5 5)
+      let item = head (filter (\x -> x ^. label == "interactWithUser") comps)
       liftIO $ do
         item ^. label `shouldBe` "interactWithUser"
         item ^. kind `shouldBe` Just CiFunction
@@ -275,10 +276,10 @@ main = hspec $ do
   describe "waitForDiagnosticsSource" $
     it "works" $ runSession "hie" fullCaps "test/data" $ do
       openDoc "Error.hs" "haskell"
-      [diag] <- waitForDiagnosticsSource "ghcmod"
+      [diag] <- waitForDiagnosticsSource "bios"
       liftIO $ do
         diag ^. severity `shouldBe` Just DsError
-        diag ^. source `shouldBe` Just "ghcmod"
+        diag ^. source `shouldBe` Just "bios"
 
   describe "rename" $
     it "works" $ runSession "hie" fullCaps "test/data" $ do