Fix tests on travis travis
authorLuke Lau <luke_lau@icloud.com>
Mon, 12 Nov 2018 22:18:29 +0000 (22:18 +0000)
committerLuke Lau <luke_lau@icloud.com>
Mon, 12 Nov 2018 22:19:27 +0000 (22:19 +0000)
.travis.yml
src/Language/Haskell/LSP/Test/Session.hs
test/Test.hs

index 4d2f4e3c095d8e03398bfa182ec640645a85b348..faae98652da6078d133cecc3bf13a6f1990c4b4a 100644 (file)
@@ -23,13 +23,13 @@ before_install:
   - git init
   - git remote add origin https://github.com/haskell/haskell-ide-engine.git
   - git pull origin master
+  - git checkout f5c903f31ef5a7ee75984faf2e6ccc0a06ab23eb
   - git submodule init
   - git submodule sync
   - git submodule update --init
   - stack --no-terminal --skip-ghc-check -j2 install
   - stack exec hoogle generate
   - cd $TRAVIS_BUILD_DIR
-  - hie --version
   - npm update
   - npm i -g javascript-typescript-langserver
 
index 2df5ab3c4263e725cc240b22933480943071ac73..9af3a6774150b559500ee544ce63a298b944d387 100644 (file)
@@ -92,7 +92,7 @@ data SessionConfig = SessionConfig
 
 -- | The configuration used in 'Language.Haskell.LSP.Test.runSession'.
 defaultConfig :: SessionConfig
-defaultConfig = SessionConfig 60 False True True Nothing
+defaultConfig = SessionConfig 60 False False True Nothing
 
 instance Default SessionConfig where
   def = defaultConfig
index 11114d91fa310b56555e317eec517dfffb14e073..9319a779ee22cc4f2cac5d9e7563a16c878e3ae7 100644 (file)
@@ -229,6 +229,12 @@ main = hspec $ do
   describe "getCompletions" $
     it "works" $ runSession "hie" def "test/data/renamePass" $ do
       doc <- openDoc "Desktop/simple.hs" "haskell"
+
+      -- wait for module to be loaded
+      skipMany loggingNotification
+      noDiagnostics
+      noDiagnostics
+
       item:_ <- getCompletions doc (Position 5 5)
       liftIO $ do
         item ^. label `shouldBe` "interactWithUser"