diff options
| author | Dmitrii Skurikhin <dmitrii.sk@gmail.com> | 2020-03-31 10:04:34 +0300 |
|---|---|---|
| committer | Dmitrii Skurikhin <dmitrii.sk@gmail.com> | 2020-03-31 10:04:34 +0300 |
| commit | 30d6a0a58dcdd20bf9ef555d5fc476436f520f85 (patch) | |
| tree | 8224d11528b52396d3ebda9abedef4e433d79671 /tests/Language/GraphQL/AST/EncoderSpec.hs | |
| parent | 613e929d91dfc46ecfc5e28479098ce52aeb56f6 (diff) | |
| download | graphql-30d6a0a58dcdd20bf9ef555d5fc476436f520f85.tar.gz | |
encode null value as "null"
Diffstat (limited to 'tests/Language/GraphQL/AST/EncoderSpec.hs')
| -rw-r--r-- | tests/Language/GraphQL/AST/EncoderSpec.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/Language/GraphQL/AST/EncoderSpec.hs b/tests/Language/GraphQL/AST/EncoderSpec.hs index 00a875c..6aa8192 100644 --- a/tests/Language/GraphQL/AST/EncoderSpec.hs +++ b/tests/Language/GraphQL/AST/EncoderSpec.hs @@ -12,6 +12,11 @@ import Text.RawString.QQ (r) spec :: Spec spec = do describe "value" $ do + context "null value" $ do + let testNull formatter = value formatter Null `shouldBe` "null" + it "minified" $ testNull minified + it "pretty" $ testNull pretty + context "minified" $ do it "escapes \\" $ value minified (String "\\") `shouldBe` "\"\\\\\"" |
