1
1
mirror of https://github.com/github/semantic.git synced 2024-12-25 07:55:12 +03:00

Compare against strings

This commit is contained in:
Rick Winfrey 2019-01-17 12:50:33 -08:00
parent ad57ac0967
commit c7b1d13ab0

View File

@ -164,12 +164,12 @@ spec config = parallel $ do
Right (Just (Module _ (_, value))) -> value `shouldBe` (Concrete.Float (Number.Decimal 9.0))
other -> expectationFailure (show other)
-- it "prevents lookup of private members external to the instance" $ do
-- (_, (_, res)) <- evaluate ["class-private1.ts", "class-private2.ts"]
-- case ModuleTable.lookup "class-private1.ts" <$> res of
-- Left (SomeError (BaseError _ _ (DerefError (Closure _ _ maybeName _ _ _ _ _)))) -> maybeName `shouldBe` (Just "private_add")
-- other -> expectationFailure (show other)
it "prevents lookup of private members external to the instance" $ do
(_, (_, res)) <- evaluate ["class-private1.ts", "class-private2.ts"]
let accessControlError = "SomeError (BaseError (ModuleInfo \"class-private2.ts\") [18, 1]..[18, 8] (AccessControlError (\"adder\",Public) (\"y\",Private) (Float 3.0)))"
case res of
Left err -> show err `shouldBe` accessControlError
other -> expectationFailure (show other)
where
fixtures = "test/fixtures/typescript/analysis/"