Execute getTypeDefinition test
authorfendor <power.walross@gmail.com>
Sat, 6 Apr 2019 17:46:49 +0000 (19:46 +0200)
committerfendor <power.walross@gmail.com>
Sat, 6 Apr 2019 17:46:49 +0000 (19:46 +0200)
test/Test.hs

index 0fc2f53f73d2511b480a83b7ef770e83ba9acba9..09f8b341b27d5c89fe57e2213c81b6f6b726dbb0 100644 (file)
@@ -259,12 +259,12 @@ main = hspec $ do
       defs <- getDefinitions doc pos
       liftIO $ defs `shouldBe` [Location (doc ^. uri) (mkRange 28 0 28 7)]
 
-  -- describe "getTypeDefinitions" $
-  --   it "works" $ runSession "hie" fullCaps "test/data/renamePass" $ do
-  --     doc <- openDoc "Desktop/simple.hs" "haskell"
-  --     let pos = Position 20 23  -- Quit value
-  --     defs <- getTypeDefinitions doc pos
-  --     liftIO $ defs `shouldBe` [Location (doc ^. uri) (mkRange 10 5 10 12)]  -- Type definition
+  describe "getTypeDefinitions" $
+    it "works" $ runSession "hie" fullCaps "test/data/renamePass" $ do
+      doc <- openDoc "Desktop/simple.hs" "haskell"
+      let pos = Position 20 23  -- Quit value
+      defs <- getTypeDefinitions doc pos
+      liftIO $ defs `shouldBe` [Location (doc ^. uri) (mkRange 10 0 15 19)]  -- Type definition
 
   describe "waitForDiagnosticsSource" $
     it "works" $ runSession "hie" fullCaps "test/data" $ do