Fix block alignment in some parser tests
This commit is contained in:
@ -14,12 +14,9 @@ import qualified Language.GraphQL.AST.DirectiveLocation as DirectiveLocation
|
||||
spec :: Spec
|
||||
spec = do
|
||||
describe "value" $ do
|
||||
context "null value" $ do
|
||||
let testNull formatter = value formatter Full.Null `shouldBe` "null"
|
||||
it "minified" $ testNull minified
|
||||
it "pretty" $ testNull pretty
|
||||
|
||||
context "minified" $ do
|
||||
it "encodes null" $
|
||||
value minified Full.Null `shouldBe` "null"
|
||||
it "escapes \\" $
|
||||
value minified (Full.String "\\") `shouldBe` "\"\\\\\""
|
||||
it "escapes double quotes" $
|
||||
@ -45,6 +42,9 @@ spec = do
|
||||
it "~" $ value minified (Full.String "\x007E") `shouldBe` "\"~\""
|
||||
|
||||
context "pretty" $ do
|
||||
it "encodes null" $
|
||||
value pretty Full.Null `shouldBe` "null"
|
||||
|
||||
it "uses strings for short string values" $
|
||||
value pretty (Full.String "Short text") `shouldBe` "\"Short text\""
|
||||
it "uses block strings for text with new lines, with newline symbol" $
|
||||
|
Reference in New Issue
Block a user