main :: IO ()
main = defaultMain =<< testCase "Kitchen Sink"
                   <$> (assertEqual "Encode" <$> expected <*> actual)
  where
    expected = Text.readFile
           =<< getDataFileName "tests/data/kitchen-sink.min.graphql"

    actual = either (error "Parsing error!") Encoder.document
         <$> parseOnly Parser.document
         <$> expected
main :: IO ()
main = defaultMain =<< testCase "Kitchen Sink"
                   <$> (assertEqual "Encode" <$> expected <*> actual)
  where
    expected = Text.readFile
           =<< getDataFileName "tests/data/kitchen-sink.min.graphql"

    actual = either (error "Parsing error!") Encoder.document
         <$> parseOnly Parser.document
         <$> expected
main = defaultMain =<< testCase "Kitchen Sink"
                   <$> (assertEqual "Encode" <$> expected <*> actual)
  where
    expected = Text.readFile
           =<< getDataFileName "tests/data/kitchen-sink.min.graphql"

    actual = either (error "Parsing error!") Encoder.document
         <$> parseOnly Parser.document
         <$> expected