Return parser error location in a list

An error can have multiple locations which are returned in a listt with
key "locations".
This commit is contained in:
2020-07-08 08:16:14 +02:00
parent b2d473de8d
commit c9e265f72c
6 changed files with 40 additions and 20 deletions

View File

@ -15,6 +15,6 @@ import Test.Hspec ( Spec
spec :: Spec
spec = describe "singleError" $
it "constructs an error with the given message" $
let errors'' = Seq.singleton $ Error "Message." 0 0
let errors'' = Seq.singleton $ Error "Message." []
expected = Response Aeson.Null errors''
in singleError "Message." `shouldBe` expected