mirror of
https://github.com/github/semantic.git
synced 2024-12-25 07:55:12 +03:00
Compare directly against SomeError ...
rather than String
values
Co-Authored-By: Rob Rix <robrix@github.com>
This commit is contained in:
parent
548cfb9dd3
commit
4998421038
@ -166,10 +166,8 @@ spec config = parallel $ do
|
||||
|
||||
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)
|
||||
let expected = Left (SomeError (inject @(BaseError (EvalError (Quieterm (Sum TypeScript.Syntax) Location) Precise (Concrete.Value (Quieterm (Sum TypeScript.Syntax) Location) Precise))) (BaseError (ModuleInfo "class-private2.ts") (Span (Pos 18 1) (Pos 18 8)) (AccessControlError ("adder", Public) ("y", Private) (Concrete.Float (Decimal 3.0))))))
|
||||
res `shouldBe` expected
|
||||
|
||||
where
|
||||
fixtures = "test/fixtures/typescript/analysis/"
|
||||
|
Loading…
Reference in New Issue
Block a user