sydtest-aeson-0.1.0.0: An aeson companion library for sydtest
Safe HaskellNone
LanguageHaskell2010

Test.Syd.Aeson

Contents

Synopsis

Golden tests

goldenJSONFile :: FilePath -> IO Value -> GoldenTest Value Source #

Test that the produced Value is the same as what we find in the given golden file.

This function shows a diff based on the encoding of the values.

pureGoldenJSONFile :: FilePath -> Value -> GoldenTest Value Source #

Test that the given Value is the same as what we find in the given golden file.

This function shows a diff based on the encoding of the values.

goldenJSONValueFile :: (Show a, Eq a, FromJSON a, ToJSON a) => FilePath -> IO a -> GoldenTest a Source #

Test that the produced Value is the same as what we find in the given golden file.

This test also tests that the previously written toJSON-ed version of the given value is still parseable as to same value.

This function shows a diff based on the pretty Showing of the values.

pureGoldenJSONValueFile :: (Show a, Eq a, FromJSON a, ToJSON a) => FilePath -> a -> GoldenTest a Source #

Test that the given Value is the same as what we find in the given golden file.

This test also tests that the previously written toJSON-ed version of the given value is still parseable as to same value.

This function shows a diff based on the pretty Showing of the values.