Skip to content

Commit e40bd2e

Browse files
authored
Migrate WatchedFileTests (#4269)
1 parent 764f8fb commit e40bd2e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ghcide/test/exe/WatchedFileTests.hs

+4-4
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
module WatchedFileTests (tests) where
55

6+
import Config (testWithDummyPluginEmpty')
67
import Control.Applicative.Combinators
78
import Control.Monad.IO.Class (liftIO)
89
import qualified Data.Aeson as A
@@ -19,12 +20,11 @@ import System.Directory
1920
import System.FilePath
2021
import Test.Tasty
2122
import Test.Tasty.HUnit
22-
import TestUtils
2323

2424
tests :: TestTree
2525
tests = testGroup "watched files"
2626
[ testGroup "Subscriptions"
27-
[ testSession' "workspace files" $ \sessionDir -> do
27+
[ testWithDummyPluginEmpty' "workspace files" $ \sessionDir -> do
2828
liftIO $ writeFile (sessionDir </> "hie.yaml") "cradle: {direct: {arguments: [\"-isrc\", \"A\", \"WatchedFilesMissingModule\"]}}"
2929
_doc <- createDoc "A.hs" "haskell" "{-#LANGUAGE NoImplicitPrelude #-}\nmodule A where\nimport WatchedFilesMissingModule"
3030
setIgnoringRegistrationRequests False
@@ -33,7 +33,7 @@ tests = testGroup "watched files"
3333
-- Expect 2 subscriptions: one for all .hs files and one for the hie.yaml cradle
3434
liftIO $ length watchedFileRegs @?= 2
3535

36-
, testSession' "non workspace file" $ \sessionDir -> do
36+
, testWithDummyPluginEmpty' "non workspace file" $ \sessionDir -> do
3737
tmpDir <- liftIO getTemporaryDirectory
3838
let yaml = "cradle: {direct: {arguments: [\"-i" <> tail(init(show tmpDir)) <> "\", \"A\", \"WatchedFilesMissingModule\"]}}"
3939
liftIO $ writeFile (sessionDir </> "hie.yaml") yaml
@@ -48,7 +48,7 @@ tests = testGroup "watched files"
4848
]
4949
, testGroup "Changes"
5050
[
51-
testSession' "workspace files" $ \sessionDir -> do
51+
testWithDummyPluginEmpty' "workspace files" $ \sessionDir -> do
5252
liftIO $ writeFile (sessionDir </> "hie.yaml") "cradle: {direct: {arguments: [\"-isrc\", \"A\", \"B\"]}}"
5353
liftIO $ writeFile (sessionDir </> "B.hs") $ unlines
5454
["module B where"

0 commit comments

Comments
 (0)