From 3c3116cfde875e483ec70df6069a864838283885 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Mon, 12 Nov 2018 22:18:29 +0000 Subject: [PATCH] Fix tests on travis --- .travis.yml | 2 +- src/Language/Haskell/LSP/Test/Session.hs | 2 +- test/Test.hs | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4d2f4e3..faae986 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/src/Language/Haskell/LSP/Test/Session.hs b/src/Language/Haskell/LSP/Test/Session.hs index 2df5ab3..9af3a67 100644 --- a/src/Language/Haskell/LSP/Test/Session.hs +++ b/src/Language/Haskell/LSP/Test/Session.hs @@ -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 diff --git a/test/Test.hs b/test/Test.hs index 11114d9..9319a77 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -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" -- 2.30.2