1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 10:15:55 +03:00

Fix up tests

Co-Authored-By: Rick Winfrey <rick.winfrey@gmail.com>
This commit is contained in:
joshvera 2018-11-15 13:17:22 -05:00
parent c7040f6131
commit 80f7c6585d

View File

@ -58,8 +58,8 @@ spec config = parallel $ do
(_, res) <- evaluate ["main4.ts", "foo.ts"]
case ModuleTable.lookup "main4.ts" <$> res of
Right (Just (Module _ (scopeGraph, (heap, valueRef)) :| [])) -> do
fmap (const ()) <$> ScopeGraph.lookupScopePath "foo" scopeGraph `shouldBe` Just (ScopeGraph.EPath ScopeGraph.Import () $ ScopeGraph.DPath (ScopeGraph.Declaration "foo") (Heap.Position 0))
valueRef `shouldBe` Rval (String $ pack "this is the foo function")
fmap (const ()) <$> ScopeGraph.lookupScopePath "foo" scopeGraph `shouldBe` Just (ScopeGraph.EPath ScopeGraph.Import () . ScopeGraph.EPath ScopeGraph.Import () $ ScopeGraph.DPath (ScopeGraph.Declaration "foo") (Heap.Position 0))
valueRef `shouldBe` Rval (String $ pack "\"this is the foo function\"")
other -> expectationFailure (show other)
it "side effect only imports dont expose exports" $ do