From 4f1628681efec92fdb69dc2faf09c3c73e1d6d83 Mon Sep 17 00:00:00 2001 From: Luke Lau Date: Fri, 20 Dec 2019 00:57:46 +0000 Subject: [PATCH] Replace rename test while HaRe is gone --- test/Test.hs | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/test/Test.hs b/test/Test.hs index ed8c6b5..eff7404 100644 --- a/test/Test.hs +++ b/test/Test.hs @@ -283,11 +283,18 @@ main = hspec $ do diag ^. severity `shouldBe` Just DsError diag ^. source `shouldBe` Just "bios" - describe "rename" $ - it "works" $ runSession "hie" fullCaps "test/data" $ do - doc <- openDoc "Rename.hs" "haskell" - rename doc (Position 1 0) "bar" - documentContents doc >>= liftIO . shouldBe "main = bar\nbar = return 42\n" + describe "rename" $ do + it "works" $ pendingWith "HaRe not in hie-bios yet" + it "works on javascript" $ + runSession "javascript-typescript-stdio" fullCaps "test/data/javascriptPass" $ do + doc <- openDoc "test.js" "javascript" + rename doc (Position 2 11) "bar" + documentContents doc >>= liftIO . (`shouldContain` "function bar()") . T.unpack + + -- runSession "hie" fullCaps "test/data" $ do + -- doc <- openDoc "Rename.hs" "haskell" + -- rename doc (Position 1 0) "bar" + -- documentContents doc >>= liftIO . shouldBe "main = bar\nbar = return 42\n" describe "getHover" $ it "works" $ runSession "hie" fullCaps "test/data/renamePass" $ do -- 2.30.2