HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Modulehspec-golden-aeson-0.9.0.0Haskell2010

Test.Aeson.Internal.GoldenSpecs

Internal module, use at your own risk.

  • 9 values
valuegoldenSpecs
  1. :: (Typeable a, Arbitrary a, ToJSON a, FromJSON a)
  2. => Settings
  3. -> Proxy a
  4. -> Spec
#

Tests to ensure that JSON encoding has not unintentionally changed. This could be caused by the following:

  • A type's instances of ToJSON or FromJSON have changed.

  • Selectors have been edited, added or deleted.

  • You have changed version of Aeson the way Aeson serialization has changed works.

If you run this function and the golden files do not exist, it will create them for each constructor. It they do exist, it will compare with golden file if it exists. Golden file encodes json format of a type. It is recommended that you put the golden files under revision control to help monitor changes.

Create the file path for the golden file. Optionally use the module name to help avoid name collissions. Different modules can have types of the same name.

Create the file path to save results from a failed golden test. Optionally use the module name to help avoid name collisions. Different modules can have types of the same name.

Create the file path to save results from a failed fallback golden test. Optionally use the module name to help avoid name collisions. Different modules can have types of the same name.