3
3
4
4
module WatchedFileTests (tests ) where
5
5
6
+ import Config (testWithDummyPluginEmpty' )
6
7
import Control.Applicative.Combinators
7
8
import Control.Monad.IO.Class (liftIO )
8
9
import qualified Data.Aeson as A
@@ -19,12 +20,11 @@ import System.Directory
19
20
import System.FilePath
20
21
import Test.Tasty
21
22
import Test.Tasty.HUnit
22
- import TestUtils
23
23
24
24
tests :: TestTree
25
25
tests = testGroup " watched files"
26
26
[ testGroup " Subscriptions"
27
- [ testSession ' " workspace files" $ \ sessionDir -> do
27
+ [ testWithDummyPluginEmpty ' " workspace files" $ \ sessionDir -> do
28
28
liftIO $ writeFile (sessionDir </> " hie.yaml" ) " cradle: {direct: {arguments: [\" -isrc\" , \" A\" , \" WatchedFilesMissingModule\" ]}}"
29
29
_doc <- createDoc " A.hs" " haskell" " {-#LANGUAGE NoImplicitPrelude #-}\n module A where\n import WatchedFilesMissingModule"
30
30
setIgnoringRegistrationRequests False
@@ -33,7 +33,7 @@ tests = testGroup "watched files"
33
33
-- Expect 2 subscriptions: one for all .hs files and one for the hie.yaml cradle
34
34
liftIO $ length watchedFileRegs @?= 2
35
35
36
- , testSession ' " non workspace file" $ \ sessionDir -> do
36
+ , testWithDummyPluginEmpty ' " non workspace file" $ \ sessionDir -> do
37
37
tmpDir <- liftIO getTemporaryDirectory
38
38
let yaml = " cradle: {direct: {arguments: [\" -i" <> tail (init (show tmpDir)) <> " \" , \" A\" , \" WatchedFilesMissingModule\" ]}}"
39
39
liftIO $ writeFile (sessionDir </> " hie.yaml" ) yaml
@@ -48,7 +48,7 @@ tests = testGroup "watched files"
48
48
]
49
49
, testGroup " Changes"
50
50
[
51
- testSession ' " workspace files" $ \ sessionDir -> do
51
+ testWithDummyPluginEmpty ' " workspace files" $ \ sessionDir -> do
52
52
liftIO $ writeFile (sessionDir </> " hie.yaml" ) " cradle: {direct: {arguments: [\" -isrc\" , \" A\" , \" B\" ]}}"
53
53
liftIO $ writeFile (sessionDir </> " B.hs" ) $ unlines
54
54
[" module B where"
0 commit comments