1
1
mirror of https://github.com/github/semantic.git synced 2024-11-28 01:47:01 +03:00

add test for await

This commit is contained in:
Ayman Nadeem 2018-08-20 17:42:58 -04:00
parent c6b31ab886
commit da79989904

View File

@ -69,6 +69,14 @@ spec config = parallel $ do
Env.names env `shouldBe` [ "x" ]
other -> expectationFailure (show other)
it "evaluates await" $ do
(_, (heap, res)) <- evaluate ["await.ts"]
case ModuleTable.lookup "await.ts" <$> res of
Right (Just (Module _ (env, addr) :| [])) -> do
Env.names env `shouldBe` [ "f2" ]
(derefQName heap ("y" :| []) env) `shouldBe` Nothing
other -> expectationFailure (show other)
it "evaluates BOr statements" $ do
(_, (heap, res)) <- evaluate ["bor.ts"]
case ModuleTable.lookup "bor.ts" <$> res of