diff --git a/hls-test-utils.cabal b/hls-test-utils.cabal
--- a/hls-test-utils.cabal
+++ b/hls-test-utils.cabal
@@ -1,6 +1,6 @@
 cabal-version: 2.4
 name:          hls-test-utils
-version:       1.0.1.0
+version:       1.1.0.0
 synopsis:      Utilities used in the tests of Haskell Language Server
 description:
   Please see the README on GitHub at <https://github.com/haskell/haskell-language-server#readme>
@@ -43,13 +43,13 @@
     , filepath
     , ghcide                  ^>=1.4
     , hls-graph
-    , hls-plugin-api          ^>=1.1
+    , hls-plugin-api          ^>=1.2
     , hspec                   <2.8
     , hspec-core
     , lens
     , lsp                     ^>=1.2
-    , lsp-test                ==0.14.0.0
-    , lsp-types               ^>=1.2
+    , lsp-test                ^>=0.14
+    , lsp-types               >=1.2  && <1.4
     , tasty
     , tasty-expected-failure
     , tasty-golden
diff --git a/src/Test/Hls.hs b/src/Test/Hls.hs
--- a/src/Test/Hls.hs
+++ b/src/Test/Hls.hs
@@ -47,7 +47,10 @@
 import           Ide.PluginUtils                   (pluginDescToIdePlugins)
 import           Ide.Types
 import           Language.LSP.Test
-import           Language.LSP.Types
+import           Language.LSP.Types                hiding
+                                                   (SemanticTokenAbsolute (length, line),
+                                                    SemanticTokenRelative (length),
+                                                    SemanticTokensEdit (_start))
 import           Language.LSP.Types.Capabilities   (ClientCapabilities)
 import           System.Directory                  (getCurrentDirectory,
                                                     setCurrentDirectory)
diff --git a/src/Test/Hls/Util.hs b/src/Test/Hls/Util.hs
--- a/src/Test/Hls/Util.hs
+++ b/src/Test/Hls/Util.hs
@@ -10,6 +10,7 @@
   (
       codeActionSupportCaps
     , expectCodeAction
+    , dontExpectCodeAction
     , expectDiagnostic
     , expectNoMoreDiagnostics
     , expectSameLocations
@@ -45,12 +46,14 @@
 import           Control.Monad
 import           Control.Monad.IO.Class
 import qualified Data.Aeson                      as A
+import           Data.Bool                       (bool)
 import           Data.Default
 import           Data.List                       (intercalate)
 import           Data.List.Extra                 (find)
 import           Data.Maybe
 import qualified Data.Set                        as Set
 import qualified Data.Text                       as T
+import           Development.IDE                 (GhcVersion(..), ghcVersion)
 import qualified Language.LSP.Test               as Test
 import           Language.LSP.Types              hiding (Reason (..))
 import qualified Language.LSP.Types.Capabilities as C
@@ -107,24 +110,6 @@
    -- , "./test/testdata/wErrorTest/"
   ]
 
-data GhcVersion
-  = GHC810
-  | GHC88
-  | GHC86
-  | GHC84
-  deriving (Eq,Show)
-
-ghcVersion :: GhcVersion
-#if (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,10,0,0)))
-ghcVersion = GHC810
-#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,8,0,0)))
-ghcVersion = GHC88
-#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,6,0,0)))
-ghcVersion = GHC86
-#elif (defined(MIN_VERSION_GLASGOW_HASKELL) && (MIN_VERSION_GLASGOW_HASKELL(8,4,0,0)))
-ghcVersion = GHC84
-#endif
-
 data EnvSpec = HostOS OS | GhcVer GhcVersion
     deriving (Show, Eq)
 
@@ -148,25 +133,19 @@
     | otherwise = id
 
 knownBrokenOnWindows :: String -> TestTree -> TestTree
-knownBrokenOnWindows reason
-    | isWindows = expectFailBecause reason
-    | otherwise = id
+knownBrokenOnWindows = knownBrokenInEnv [HostOS Windows]
 
 knownBrokenForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree
-knownBrokenForGhcVersions vers reason
-    | ghcVersion `elem` vers =  expectFailBecause reason
-    | otherwise = id
+knownBrokenForGhcVersions vers = knownBrokenInEnv (map GhcVer vers)
 
--- | IgnroeTest if /any/ of environmental spec mathces the current environment.
+-- | IgnoreTest if /any/ of environmental spec mathces the current environment.
 ignoreInEnv :: [EnvSpec] -> String -> TestTree -> TestTree
 ignoreInEnv envSpecs reason
     | any matchesCurrentEnv envSpecs = ignoreTestBecause reason
     | otherwise = id
 
 ignoreForGhcVersions :: [GhcVersion] -> String -> TestTree -> TestTree
-ignoreForGhcVersions vers reason
-    | ghcVersion `elem` vers =  ignoreTestBecause reason
-    | otherwise = id
+ignoreForGhcVersions vers = ignoreInEnv (map GhcVer vers)
 
 -- ---------------------------------------------------------------------
 
@@ -338,6 +317,10 @@
 onMatch :: [a] -> (a -> Bool) -> String -> IO a
 onMatch as predicate err = maybe (fail err) return (find predicate as)
 
+noMatch :: [a] -> (a -> Bool) -> String -> IO ()
+noMatch [] _ _ = pure ()
+noMatch as predicate err = bool (pure ()) (fail err) (any predicate as)
+
 inspectDiagnostic :: [Diagnostic] -> [T.Text] -> IO Diagnostic
 inspectDiagnostic diags s = onMatch diags (\ca -> all (`T.isInfixOf` (ca ^. L.message)) s) err
     where err = "expected diagnostic matching '" ++ show s ++ "' but did not find one"
@@ -353,6 +336,14 @@
 
 expectCodeAction :: [Command |? CodeAction] -> [T.Text] -> IO ()
 expectCodeAction cars s = void $ inspectCodeAction cars s
+
+dontExpectCodeAction :: [Command |? CodeAction] -> [T.Text] -> IO ()
+dontExpectCodeAction cars s =
+  noMatch cars predicate err
+    where predicate (InR ca) = all (`T.isInfixOf` (ca ^. L.title)) s
+          predicate _        = False
+          err = "didn't expected code action matching '" ++ show s ++ "' but found one anyway"
+
 
 inspectCommand :: [Command |? CodeAction] -> [T.Text] -> IO Command
 inspectCommand cars s = fromCommand <$> onMatch cars predicate err
