@@ -124,7 +124,7 @@ codeLensTests = testGroup
124124 , testCase " Do not construct error action!, Ticket3942one" $ do
125125 runSessionWithServer def classPlugin testDataDir $ do
126126 doc <- openDoc " Ticket3942one.hs" " haskell"
127- _ <- waitForDiagnosticsFromSource doc ( T. unpack sourceTypecheck)
127+ _ <- waitForDiagnosticsFrom doc
128128 lens <- getAllCodeActions doc
129129 -- should switch to `liftIO $ length lens @?= 2, when Ticket3942 is entirely fixed`
130130 -- current fix is just to make sure the code does not throw an exception that would mess up
@@ -165,7 +165,7 @@ goldenCodeLens title path idx =
165165goldenWithClass :: TestName -> FilePath -> FilePath -> ([CodeAction ] -> Session () ) -> TestTree
166166goldenWithClass title path desc act =
167167 goldenWithHaskellDoc def classPlugin title testDataDir path (desc <.> " expected" ) " hs" $ \ doc -> do
168- _ <- waitForDiagnosticsFromSource doc ( T. unpack sourceTypecheck)
168+ _ <- waitForDiagnosticsFrom doc
169169 actions <- concatMap (^.. _CACodeAction) <$> getAllCodeActions doc
170170 act actions
171171 void $ skipManyTill anyMessage (getDocumentEdit doc)
@@ -175,7 +175,7 @@ expectCodeActionsAvailable title path actionTitles =
175175 testCase title $ do
176176 runSessionWithServer def classPlugin testDataDir $ do
177177 doc <- openDoc (path <.> " hs" ) " haskell"
178- _ <- waitForDiagnosticsFromSource doc ( T. unpack sourceTypecheck)
178+ _ <- waitForDiagnosticsFrom doc
179179 caResults <- getAllCodeActions doc
180180 liftIO $ map (^? _CACodeAction . L. title) caResults
181181 @?= expectedActions
0 commit comments