diff options
| author | Eugen Wissner <belka@caraus.de> | 2024-10-17 18:08:30 +0200 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2024-10-17 18:08:30 +0200 |
| commit | cdb2aa76b63618b450c5f2c777f8bbac05506457 (patch) | |
| tree | a5d9304794eb437cbb74d806706f50e55784376e /tests/Language/GraphQL/AST/EncoderSpec.hs | |
| parent | b056b4256f883c4b52c32d7df9568f8dd12dcfab (diff) | |
| download | graphql-cdb2aa76b63618b450c5f2c777f8bbac05506457.tar.gz | |
Fix block alignment in some parser tests
Diffstat (limited to 'tests/Language/GraphQL/AST/EncoderSpec.hs')
| -rw-r--r-- | tests/Language/GraphQL/AST/EncoderSpec.hs | 10 |
1 files changed, 5 insertions, 5 deletions
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" $ |
