1
1
mirror of https://github.com/github/semantic.git synced 2024-12-01 00:33:59 +03:00

valueRef should be a Unit

This commit is contained in:
joshvera 2018-11-15 13:32:58 -05:00
parent 4769c2cb24
commit b0966e0e3b

View File

@ -49,9 +49,7 @@ spec config = parallel $ do
case ModuleTable.lookup "a.ts" <$> res of
Right (Just (Module _ (scopeGraph, (heap, valueRef)) :| [])) -> do
fmap (const ()) <$> ScopeGraph.lookupScopePath "baz" scopeGraph `shouldBe` Just (ScopeGraph.DPath (ScopeGraph.Declaration "baz") (Heap.Position 0))
let closure' (Rval (Closure packageInfo moduleInfo name params _ _)) = Right (Closure packageInfo moduleInfo name params (Right ()) ())
closure' _ = Left ()
closure' valueRef `shouldBe` Right (Closure (PackageInfo { packageName = "analysis", packageResolutions = mempty }) (ModuleInfo "a.ts") "baz" [] (Right ()) ())
valueRef `shouldBe` Rval Unit
other -> expectationFailure (show other)
it "imports functions" $ do