From cdb2aa76b63618b450c5f2c777f8bbac05506457 Mon Sep 17 00:00:00 2001 From: Eugen Wissner Date: Thu, 17 Oct 2024 18:08:30 +0200 Subject: Fix block alignment in some parser tests --- tests/Language/GraphQL/AST/EncoderSpec.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'tests/Language/GraphQL/AST/EncoderSpec.hs') diff --git a/tests/Language/GraphQL/AST/EncoderSpec.hs b/tests/Language/GraphQL/AST/EncoderSpec.hs index b916658..e98d5ef 100644 --- a/tests/Language/GraphQL/AST/EncoderSpec.hs +++ b/tests/Language/GraphQL/AST/EncoderSpec.hs @@ -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" $ -- cgit v1.2.3