HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulehspec-golden-aeson-0.9.0.0Haskell2010

Test.Aeson.Internal.ADT.GoldenSpecs

Internal module, use at your own risk.

  • 10 values
valuegoldenADTSpecs
  1. :: (ToADTArbitrary a, Eq a, Show 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.